• 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/masking one image with the alpha value from another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawing/masking one image with the alpha value from another


  • Subject: Re: drawing/masking one image with the alpha value from another
  • From: David Duncan <email@hidden>
  • Date: Tue, 22 Sep 2009 09:20:08 -0700

On Sep 21, 2009, at 9:32 PM, Roland King wrote:

I'm trying to construct an image which is colored according to the alpha value of a different image. I've been hunting around the Quartz Core docs and I can't figure out a good way to do this. The motivation is to do something similar to what apple does on the iphone tabbar items which are drawn white or blue using the alpha of the image you supply and it's a pretty good effect I want to reuse.


Just use your second image as a mask via CGContextClipToMask(). If you use a normal image, then the alpha values are used as alpha for the drawing you do which should do exactly what you want.
--
David Duncan
Apple DTS Animation and Printing


_______________________________________________

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


  • Follow-Ups:
    • Re: drawing/masking one image with the alpha value from another
      • From: Roland King <email@hidden>
    • Re: drawing/masking one image with the alpha value from another
      • From: Ken Ferry <email@hidden>
References: 
 >drawing/masking one image with the alpha value from another (From: Roland King <email@hidden>)

  • Prev by Date: Re: Controlling Spaces and retrieving information about the current Space?
  • Next by Date: Re: OR compositing operation?
  • Previous by thread: Re: drawing/masking one image with the alpha value from another
  • Next by thread: Re: drawing/masking one image with the alpha value from another
  • Index(es):
    • Date
    • Thread