Weird problem with NSBezierpath fill method
Weird problem with NSBezierpath fill method
- Subject: Weird problem with NSBezierpath fill method
- From: Vinay Prabhu <email@hidden>
- Date: Thu, 9 Nov 2006 17:28:35 +0530
- Importance: Normal
Hi,
I have encountered a strange problem with the NSBezierPath's, fill method.
The "fill" method will not fill the path with the current color set.
The code is like this,
//m_pInnerOutline is the object of class NSBezierPath
NSSize aSize;
aSize.width = m_uiWidth; //Width of the image
aSize.height = m_uiHeight; //Height of the image
NSImage* drawImage = nil;
drawImage = [[NSImage alloc] initWithSize:aSize];
NSRect fillRect = NSMakeRect(0, 0, aSize.width, aSize.height);
[drawImage lockFocus];
[[NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0] set];
NSRectFill(fillRect);
[[NSColor colorWithCalibratedRed:1 green:0 blue:1 alpha:1] set];
[m_pInnerOutline setLineWidth:2];
[m_pInnerOutline setWindingRule:NSEvenOddWindingRule];
[m_pInnerOutline stroke]; //This method works
[m_pInnerOutline fill]; //This method doesn't works
[drawImage unlockFocus];
The "stroke" method works fine, but the "fill" method will not work.
I had saved the drawImage as tif image and attached with the mail.
I am not understanding why "fill" method is not working !!!!
If bezier path contains only rectangle, the fill method works fine.
Does anybody know what is causing this problem? or anything wrong in the
code?
Regards
Vinay
Attachment:
BezierFill.zip
Description: Zip compressed data
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden