I have a problem with the containsPoint method. I draw some boxes and connectors between the boxes. The connectors are basicly a single curve, based on a single curveToPoint:controlPoint1:controlPoint2 call. When I now try to select this curve/path with the mouse then this is tricky to do. The containsPoint: method seems to be very sensitive. I tried to draw the line bigger (setLineWidth:), but that doesn't seem to help.
Any ideas what I need to do differently?
For a CGPath, you can always create a closed path which is the contour of the stroked path using:
You can read more about path hit testing here (by Ole Begemann) and here (by Rob Napier).