Re: Drawing text with alpha
Re: Drawing text with alpha
- Subject: Re: Drawing text with alpha
- From: "Marc Wan" <email@hidden>
- Date: Wed, 22 Aug 2007 09:17:35 +0800
On 8/22/07, Phil <email@hidden> wrote:
>
> This seems to be a common question related to drawing graphics but I
> haven't found an answer that addresses alpha and text. I've got a
> simple NSView subclass which draws a blue background and want to draw
> text with it's background alpha set to .1. But as the alpha is
> decreased, the background becomes black. My example (how not to do
> it) code:
I think you have two choices:
1. use "clearColor" on NSColor.
2. simply don't use a background colour.
In my app, I draw text a few times where I want the background to be the
view's background, so I just don't specify a colour. Works great.
marc.
_______________________________________________
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