Re: Bug in [path containsPoint]?
Re: Bug in [path containsPoint]?
- Subject: Re: Bug in [path containsPoint]?
- From: "Brian O'Brien" <email@hidden>
- Date: Mon, 13 Jun 2005 10:13:11 -0600
On Jun 3, 2005, at 5:38 PM, John C. Randolph wrote:
Are you sending -closePath, or just adding a path segment back to the first point?
-jcr
I am not calling -closePath
This is what I do.
NSBezierPath *path = [NSBezierPath bezierPath];
[path appendBezierPathWithPoints:ptArray count:m];
On Jun 2, 2005, at 1:05 PM, Brian O'Brien wrote:
I think I've found a but in NSBezierPath, but not sure.
I've written an application that draws a polygon on top of an image (using mouse clicks)
After the polygon (a simple triangle) is defined and the mouse enters the polygon the image is filled with a particular pixel color.
I get the bounding box of the polygon then check each pixel in the bounding box (using containsPoint) to determine
if the image's pixel should be changed.
Depending on the order that the polygon was defined (ie left hand rule vs right hand rule) I get different values
for contiansPoint and in fact some of the values are not even in the polygon boundary. (the bug)
Can someone verify that this happens one their system as well?
I'm on 10.3.9
<Picture 1.pdf>
Notice the bottom polygon has a white horizontal line outside the polygon, where as the other doesn't?
This is reproducible in my application.
John C. Randolph <email@hidden> (408) 974-8819
Lame Duck Cocoa Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden