Re: Lock/unlock focus does not draw image in Snow Leopard
"Adam R. Maxwell" <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Aug 28, 2009, at 7:48 PM, Michael McCulloch wrote: > Actually lockFocus on an image is perfectly reasonable and legit. My > situation is that I have a bunch of smaller "master" images that are > used to build bigger composited images based on program context, so > my draw selector does all that work. It basically selects rects from > the masters and builds a composite image result. Keeping the master > images small at design time considerably reduces the size of my > distribution. It's not clear what you expect to happen here, since what you're doing seems at best undefined. If you want to draw the NSCustomImageRep in an NSImage, send lockFocus to the NSImage and then draw the rep without adding it. You are adding the NSCustomImageRep to an NSImage, then drawing that same rep to the same NSImage. That draws into some internal image rep of the image (likely an NSCachedImageRep, at least in 10.5 and earlier), and probably does various other odd things. What are you doing with that NSImage? _______________________________________________ MacOSX-dev mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-dev