Re: Strange issue in stroking a bezier path
Re: Strange issue in stroking a bezier path
- Subject: Re: Strange issue in stroking a bezier path
- From: Jens Alfke <email@hidden>
- Date: Sat, 05 May 2012 09:40:52 -0700
On May 5, 2012, at 7:41 AM, Peter Teeson wrote:
> But I did not realize that the bounds stroke was straddling the view content edges.
> How did you learn that?
If you think about it, drawing a stroke along a path _has_ to draw on both sides of the path (i.e. centered on the path) because there isn’t necessarily any inside or outside; the path might not be closed, or it might be a figure 8 or something.
Another side effect of this is that, if the path width is an odd number of pixels, you should offset your coordinates by 0.5 to make sure you completely fill pixels, otherwise you’ll have fuzzy borders on your horizontal and vertical strokes.
—Jens
_______________________________________________
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