Re: Create a polygon region
Re: Create a polygon region
- Subject: Re: Create a polygon region
- From: email@hidden
- Date: Fri, 8 Mar 2002 13:42:55 -0800
If there's any call like CreatePolygonRgn() and PtInRegion() in MacOSX?
(As
Windows have these API).
I just want to create a polygon region with seriese of points, and test
if
other points and rectangles are in this region or not. In Windows these
two
functions make this quite easy, but I can't find similar API in MacOSX.
If
anybody can give me some hint about it?
Check out NSBezierPath. -containsPoint: is the method you would use
to hit-test points. I don't know whether there's a general way to
determine whether two bezier paths intersect (the more general version
of the rectangle-containment test you mention).
Good luck...
Ben Haller
Stick Software
_______________________________________________
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.