Re: Fill box with repeating text
Re: Fill box with repeating text
- Subject: Re: Fill box with repeating text
- From: Chris Suter <email@hidden>
- Date: Sat, 25 Apr 2009 14:10:42 +1000
Hi Trygve,
2009/4/25 Trygve Inda <email@hidden>
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 (email@hidden)
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:
This email sent to email@hidden