lockFocus clearing current color
lockFocus clearing current color
- Subject: lockFocus clearing current color
- From: Jonathon Mah <email@hidden>
- Date: Sun, 17 Apr 2005 01:51:57 +0930
Hi,
This feels like it should have a simple answer, but I've searched and
can't find anything. I'm trying to draw an NSBezierPath into an NSImage
with the current color. I can break it down to this case:
NSImage *myImage = [[NSImage alloc] initWithSize:[path bounds].size];
[myImage lockFocus];
[path fill];
[myImage unlockFocus];
The problem is that the path is filled with black instead of the
current drawing color (which was set just above). How can I maintain
that color when drawing into my image?
(I can't put [someColor set] immediately above [path fill], as the
color will be set somewhere, then this method will be called.)
Thanks,
Jonathon Mah
email@hidden
_______________________________________________
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