FROM : Jonathon Mah
DATE : Sat Apr 16 18:21:57 2005
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_removed>
DATE : Sat Apr 16 18:21:57 2005
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_removed>
| Related mails | Author | Date |
|---|---|---|
| Jonathon Mah | Apr 16, 18:21 | |
| Ian was here | Apr 16, 18:57 | |
| Jonathon Mah | Apr 16, 18:58 | |
| Ian was here | Apr 16, 19:01 | |
| Jonathon Mah | Apr 16, 19:04 | |
| Matt Neuburg | Apr 16, 19:10 | |
| Jonathon Mah | Apr 16, 19:19 | |
| Jonathon Mah | Apr 16, 20:10 |






Cocoa mail archive

