Re: NSBezierPath from NSImage
Re: NSBezierPath from NSImage
- Subject: Re: NSBezierPath from NSImage
- From: Andrew Farmer <email@hidden>
- Date: Wed, 27 Dec 2006 15:45:57 -0800
On 27 Dec 06, at 15:06, Alan Smith wrote:
Thanks Steve, that will work great but not in one case. If I don't
have the image I can't add such a shadow. And I don't really want to
just give it a shadow/focus ring.
Let me explain further.
In the end, I want to be able to "restrict" drawing to the image. In
other words, the drawing I perform should be not able to go outisde of
the edge of the image. I thought that I might somehow be able to use a
NSBezierPath to do this. I want the "image outline" to be an object
that can be passed around for drawing into.
If it helps any, I'll be able to get the rect that the image will be
drawn into before and after. So, perhaps I could take a "snapshot"
before and after and overlay the two and come out with an image of the
image that was drawn. Even if I knew how to do this I would still have
to find a way to make some sort of "restrictor."
You don't need a path to do this - you're making things too
complicated. NSCompositeDestinationAtop and the right alpha mask will
do the work for you.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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