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

2009-09-23 Thread David Duncan
On Sep 23, 2009, at 6:25 AM, Roland King wrote: One question about Transparency Layers, the docs say that when you start one the global alpha is set to 1, shadows are turned off and blend mode is set normal (actually only the Quartz 2D guide says that the blend mode changes, the actual API

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

2009-09-23 Thread David Duncan
On Sep 22, 2009, at 9:42 AM, Roland King wrote: Thanks David .. I'm a little confused by this though. The documentation for masks doesn't really tell you where alpha fits in to the overall 'mask value', When you use an image as a mask, the alpha *is* the mask value. 1.0 means full passthr

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

2009-09-23 Thread Roland King
Thank you Ken, and for the transparency layer hint too, I wouldn't have thought of that. I missed a whole load of blend modes not realizing that the Quartz 2D Programming Guide didn't list them all, it stops at luminosity, my bad there for not checking out the actual class docs and finding

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

2009-09-23 Thread Roland King
Thanks David .. I'm a little confused by this though. The documentation for masks doesn't really tell you where alpha fits in to the overall 'mask value', in fact they don't really say how a general RGB value maps to 0->1.0. They talk totally about color as in RGB (1,1,1) maps to 1 and RGB(0

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

2009-09-22 Thread Ken Ferry
On Tue, Sep 22, 2009 at 9:20 AM, David Duncan wrote: > 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

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

2009-09-22 Thread David Duncan
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

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

2009-09-22 Thread Alastair Houghton
On 22 Sep 2009, at 06:18, Roland King wrote: I hadn't seen CIFilter, no, that might have been a good avenue to explore however I think that's not available on the phone (and this is for the phone even though I didn't explicitly state that earlier, apologies). So I'll have to use something a

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

2009-09-21 Thread Roland King
I hadn't seen CIFilter, no, that might have been a good avenue to explore however I think that's not available on the phone (and this is for the phone even though I didn't explicitly state that earlier, apologies). So I'll have to use something a bit more primitive. I think perhaps a bitmap co

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

2009-09-21 Thread BravoBug Software
Modifying the bitmap data yourself shouldn't be too difficult, for an NSBitmapImageRep you'd just grab the data with the -bitmapData method. But have you checked out CIFilter? I'm not entirely sure I understood what your goal is but there's likely a filter in place already that will do it for you:

drawing/masking one image with the alpha value from another

2009-09-21 Thread Roland King
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 draw