Re: NSImage and layer transparency
Re: NSImage and layer transparency
- Subject: Re: NSImage and layer transparency
- From: Ryan Britton <email@hidden>
- Date: Sun, 5 Feb 2006 22:20:23 -0800
I have not tried this, but maybe:
void NSRectFillUsingOperation(NSRect aRect, NSCompositingOperation op)
Just set the current color to one with an alpha component and fill
the appropriate rect. Depending on the effect you want, pick a
different compositing operation.
On Feb 5, 2006, at 9:12 PM, patrick wrote:
In Photoshop, one can "lock" a layer's transparency, and then fill the
layer with a particular colour (let's use red for this example). If
some pixels on the layer are 50% opacity, when the red fill occurs,
those pixels will maintain their opacity but will take on the new red
colour.
I'm wondering if there's any way to achieve a similar result
programatically using NSImage? It clearly understands transparency (a
transparent, layered TIFF file loads perfectly), so I'm wondering if
there are any techniques to filling the image with a certain colour
while maintaining the transparency values?
Patrick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden