>> 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. > > This is because you're drawing the image incorrectly for your purposes. If > you: > > [[theImage TIFFRepresentation] writeToFile: [@"~/Desktop/halla.tiff" > stringByExpandingTildeInPath] atomically: YES]; > > That'll write the image to your desktop. Open it in Preview or > something, and you'll see that the background is, in fact, > transparent. What you want to do instead is use a different > compositing operation when you draw the image. NSCompositeSourceOver > is most likely what you want: > > [theImage drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: > NSCompositeSourceOver fraction: 1.0];
Where does this go as it is drawing the image, not the text? The image is drawn with a RectFill call?? Trygve _______________________________________________ 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