NSBezierPath hit- or proximity-detection.
NSBezierPath hit- or proximity-detection.
- Subject: NSBezierPath hit- or proximity-detection.
- From: email@hidden
- Date: Fri, 21 Feb 2003 06:10:03 -0800
The Cocoa docs suggest that "Using methods of NSBezierPath, you can also
perform hit detection on the filled or stroked path."
I draw a simple set of open curves that do not enclose pixels as such, but the
line width is sufficient that a user can easily click on the path.
[NSBezierPath contains:] does not recognize such a click.
Is there any other approach that could? I have used NSReadPixel for a stopgap
solution but this requires each path to be a unique colour.
Other things I'd like to do:
- given a coordinate, get the distance to the closest point on the path
- given a distance on the path, query the coordinate of the drawing pen
_______________________________________________
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.