On Tue, Feb 24, 2009 at 5:50 AM, Ashish Tiwari
<ashish_tiw...@persistent.co.in> wrote:
> //NSImage *img = [[NSImage
> alloc]initWithContentsOfFile:@"/Users/ashisht/Desktop/downloads.png"];
...
>  [img lockFocus];

Don't try to create an image and then draw into it in this way. You're
likely to end up with multiple NSImageReps only one of which contains
your drawing, and then it'll be a crapshoot as to whether the one with
your drawing is the one that's used to display later on.

Instead, create a second NSImage. Lock focus on that one, draw both
the original image and your other stuff into it. Then use the second
image.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to