• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Stroke rendering bug in Core Graphics?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stroke rendering bug in Core Graphics?


  • Subject: Stroke rendering bug in Core Graphics?
  • From: Graham Cox <email@hidden>
  • Date: Mon, 13 Feb 2012 11:15:46 +1100

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@hidden)

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:

This email sent to email@hidden


  • Prev by Date: Re: Playing Music in Objective C
  • Next by Date: copy & isEqual nightmares
  • Previous by thread: Re: How to parse a search string..
  • Next by thread: copy & isEqual nightmares
  • Index(es):
    • Date
    • Thread