I've come across an odd rendering artefact when drawing a stroked path using 
[NSBezierPath stroke] in Lion (other systems not checked yet, but I don't 
recall seeing this before).


This screen shot illustrates the problem: 
http://mapdiva.com/bugger/uploads/quartzbug.png  


When you have a curve segment where the control points are exactly on the line 
between the two end points, and there is sufficient stroke width to see it, the 
mid-point of the line seems to have a sort of "cross over" effect evident. Can 
someone confirm that this is a Quartz/Core Graphics bug before I waste any more 
time chasing it through my code?

The control points have to be calculated mathematically to be on the line - 
just placing them there by eye doesn't reveal the problem. I can apparently 
work around it by offsetting the points a very small distance from the path 
(adding 0.1 to the x coordinate, for example) but it's a bit hackish and 
ensuring it's a sufficient fix in all cases is quite a chore. It might seem a 
very unlikely thing to occur, but not so - when converting a straight line 
segment to a curve segment, the control handles have to be initially placed 
somewhere, and the logical place is on the line such that the segment shape 
doesn't change but the handles show up.

--Graham



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to