Hi Trygve, 2009/4/25 Trygve Inda <cocoa...@xericdesign.com>
Makes the text transparent, but I can't seem to make the background of the > NSImage transparent. I want to end up with white text on a transparent > background, but [[NSImage alloc] initWithSize:[theString size]] seems to > set > the background to solid white. > > How can I fix this? It won't necessarily be initWithSize that sets the background to white. It's more likely the lockFocus call which causes an NSCachedImageRep to be created. Now I'm not sure how you can change it so that it creates a clear background by default, but you can easily fix the background by calling NSRectFillWithOperation(rect, NSCompositeClear) just after you've locked focus on the image. Regards, Chris _______________________________________________ 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