Re: drawing/masking one image with the alpha value from another
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