Removing fuzzy lines (was Re: [NSBezierPath clipRect] do not do what is says!)
Removing fuzzy lines (was Re: [NSBezierPath clipRect] do not do what is says!)
- Subject: Removing fuzzy lines (was Re: [NSBezierPath clipRect] do not do what is says!)
- From: Alastair Houghton <email@hidden>
- Date: Fri, 27 Feb 2004 09:00:07 +0000
On 27 Feb 2004, at 02:04, Eric Forget wrote:
>
So when you stroke a line
>
with a width of 1 pixel it have to "touch" two pixels in grey instead
>
of
>
black to approximate what you want. At high resolution, you won't see
>
the
>
problem, but at 72 dpi the result is less than adequate (all depends
>
of your
>
needs, for sure!). By translating the origin of 0.5, 0.5 you make sure
>
that
>
Quartz draw directly on the pixels.
As I pointed-out in my other post, this doesn't work 100% of the time.
With the default endcap setting, a line of 1pt thickness from (10,
10.5) to (30, 10.5) will be solid, but a similar line from (10.5, 10.5)
to (30.5, 10.5) will have fuzzy ends. The reason is that unless the
style is set to NSSquareLineCapStyle, the latter line will only fill
half a pixel at either end.
It will, of course, work for closed boxes and other similar shapes,
because the line will enter and leave the corner pixels, filling them
completely.
Kind regards,
Alastair.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.