• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drawing text with alpha
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Drawing text with alpha (From: Phil <email@hidden>)

  • Prev by Date: Re: Drawing text with alpha
  • Next by Date: Re: Drawing text with alpha
  • Previous by thread: Re: Drawing text with alpha
  • Next by thread: Re: Drawing text with alpha
  • Index(es):
    • Date
    • Thread