Re: Drawing with a mask
Re: Drawing with a mask
- Subject: Re: Drawing with a mask
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 15 Apr 2002 13:46:33 -0700
On Saturday, April 13, 2002, at 05:09 AM, David Remahl wrote:
Hi, all!
I want to draw an image based on a mask. What I mean is, I want
to draw only
the parts of an image where its alpha and the mask alpha
intersect. I have
tried all the different compositioning modes, and the one that
is closest is
NSCompositeSourceIn, but that restricts the drawing of the
source to the
alpha of the target but leaves the target visible. That is a
problem if the
source image is smaller than the destination, as I don't want the
destination to show up.
What approach do you suggest that I take?
You can do this in more than one step, by creating a new NSImage
that serves as a place to composite two images together, which
you can then draw somewhere else.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.