Re: How to draw a 1 pixel bezierPath
Re: How to draw a 1 pixel bezierPath
- Subject: Re: How to draw a 1 pixel bezierPath
- From: Andy Matuschak <email@hidden>
- Date: Sat, 20 Aug 2005 21:46:12 -0500
This occurs because Cocoa's graphical system has point origins on
grid lines, not at the center of pixels. Thus, when you have a line
width of one, half of the line extends into one pixel and half of it
is in another. If you'd like a line to be one pixel wide and not
lightened due to smoothing, try adding making the points end at 0.5.
More information on this subject is available at http://
www.cocoadev.com/index.pl?NSBezierPath.
- Andy Matuschak
On Aug 20, 2005, at 8:52 PM, Ron Fleckner wrote:
Hi,
I'm trying to draw a 1 pixel wide bezierPath, but any value I set
in setLineWidth: that is less than 2.0 results in a 2 pixel wide
line. One pixel width lines are everywhere (at the bottom of
window title bars, toolbars and etc.) but not in my project! I'm
not trying to do anything fancy and just use [path
moveToPoint:aPoint], [path lineToPoint:nextPoint], [path
setLineWidth:1.0], [path stroke].
Where should I be looking for info? The NSBezierPath docs and
Basic Drawing make no mention of a 2 pixel floor for lineWidth.
Thanks for any help,
Ron
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40andymatuschak.org
This email sent to email@hidden
_______________________________________________
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