Re: One pixel width. One.
Re: One pixel width. One.
- Subject: Re: One pixel width. One.
- From: Graham Cox <email@hidden>
- Date: Sat, 26 Apr 2008 14:38:00 +1000
Setting a line width of 0 on NSBezierPath means "draw it 1 pixel wide
at whatever resolution the destination device is". 1 pixel on the
screen aligned to an integer coordinate will draw two pixels wide at
half the brightness (anti-aliasing).
Thus, 1. offset your coordinates by 0.5 to avoid this effect.
2. RTFD. It's very well documented.
hth,
G.
On 26 Apr 2008, at 1:58 am, Lorenzo wrote:
Joe, thank you. That page helps. I succeeded, but I had to set the
width to
0.01 because if I set it to zero I get a 2 pixels thick line when
the scale
is different than 1.0. Don't know why. Please follow me.
[NSBezierPath setDefaultLineWidth:0.0];
_______________________________________________
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