Skip navigation.
 
mlRe: lockFocus clearing current color
FROM : Ian was here
DATE : Sat Apr 16 18:57:11 2005

After locking focus onto another view/image, you may
need to set the color again, otherwise it will default
to black.



--- Jonathon Mah <<email_removed>> wrote:
> 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>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be
> ignored.
> Cocoa-dev mailing list   
> (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
>

http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>



       
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide

Related mailsAuthorDate
mllockFocus clearing current color Jonathon Mah Apr 16, 18:21
mlRe: lockFocus clearing current color Ian was here Apr 16, 18:57
mlRe: lockFocus clearing current color Jonathon Mah Apr 16, 18:58
mlRe: lockFocus clearing current color Ian was here Apr 16, 19:01
mlRe: lockFocus clearing current color Jonathon Mah Apr 16, 19:04
mlRe: lockFocus clearing current color Matt Neuburg Apr 16, 19:10
mlRe: lockFocus clearing current color Jonathon Mah Apr 16, 19:19
mlRe: lockFocus clearing current color Jonathon Mah Apr 16, 20:10