Because strokes are drawn centred on the coordinate of the path, so a
1-pixel line extends 0.5 of a pixel above and below the coordinate.
Offsetting by 0.5 makes it draw such that the exact pixel is filled.
------
S.O.S.
On 17 Apr 2008, at 9:17 am, Martin wrote:
It works!
Why such a behaviour?
Thanks,
-Martin
On Apr 17, 2008, at 1:15 AM, John Terranova wrote:
Try adding these lines before creating the NSBezierPath:
cellFrame.origin.x += 0.5;
cellFrame.origin.y += 0.5;
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]