RgnHandle replacement?
RgnHandle replacement?
- Subject: RgnHandle replacement?
- From: Jonathan Wight <email@hidden>
- Date: Wed, 06 Nov 2002 17:43:17 -0600
In my cocoa NSView subclass I have a bunch of icons and want to allow the
user to select them with a selection marquee. I've the core of this working
but to test if the icons are selected by the marquee I'm using
NSIntersectsRect to see if the marquee rectangle is intersecting the icon's
bounds rect.
That's great and all is happy - except I'd like to see if the actual opaque
pixels of the icon are within the marquee rectangle. Under Carbon I'd create
a RgnHandle from the icon's bitmap and then a RgnHandle for the marquee and
then test to see if the intersection is empty or not.
Now it looks like NSBezierPath can do at least some of what RgnHandles used
to do but there doesn't seem to be an easy way to create a NSBezierPath from
an NSImage(Rep) and even if I can create an NSBezierPath I don't really see
how I can test the intersection between two of them. I've seen how winding
rules and appending paths together seem to work - but will it work when the
paths overlap?
Any help appreciated.
Jon.
_______________________________________________
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.