In the following code fragment the variable "inside" is set to true
as I would expect. However if I remove the call to
CGPathCloseSubpath "inside" becomes false. This isn't what I would
expect since the point is well within the path even if the path
isn't closed. Is it fair to conclude that CGPathContainsPoint
requires all subpaths to be closed? If so, is this by design or
should I file a bug?
Thanks,
Nick
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, nil, 0, 0);
CGPathAddLineToPoint(path, nil, 100, 100);
CGPathAddLineToPoint(path, nil, 200, 0);
CGPathCloseSubpath(path); // this line is apparently required
CGPoint testPt = {100, 50};
bool inside = CGPathContainsPoint(path, nil, testPt, false);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden