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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to