Hit testing open bezier path
Hit testing open bezier path
- Subject: Hit testing open bezier path
- From: John Nestor <email@hidden>
- Date: Wed, 07 Aug 2002 13:42:55 -0400
I am trying to use the - (BOOL)containsPoint:(NSPoint)aPoint method to
hit test an NSBezierPath. I am working
with a sine curve as an example during development. The bezier path is
stroked but not filled (stirred, not shaken?).
The hit testing returns as though the path were filled (thus closing the
path) as well as stroked. It returns
a positive hit anywhere between the x-axis and the curve as well as on
the curve. I've tried the various winding rules.
All give the same result.
I can avoid this problem by enumerating over the list of segments in the
curve. I hit test each of the segments and report successes.
Seems like a lot of work.
Is there a way to make - (BOOL)containsPoint:(NSPoint)aPoint consider
only the open curve or does it insist
on closing the curve before doing the hit test? Orrrr... am I missing
something basic?
Tnx, JN
_______________________________________________
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.