Re: Drawing scaled lines
Re: Drawing scaled lines
- Subject: Re: Drawing scaled lines
- From: Shawn Erickson <email@hidden>
- Date: Fri, 7 Jan 2005 12:11:51 -0800
On Jan 7, 2005, at 11:41 AM, Mark Dawson wrote:
Give than NSize uses floats, what does it mean to have 1.01
points--i.e., do fractional points show up?
In the world of Quartz2D you are working in "user space" which is
mathematical description if you will of points and those are mapped to
"device space" as needed for display, print output, etc.. As a result
the mapping of a user space point to a device space pixel will use a
calculation of what pixels (physical pixels like on a display or ink on
a page) your user space point happens to overlap with or be fully
contained with in. Say your point happens to overlap with 4 pixel on
the output device (centered on a common corner point of four pixels)
then each of the four pixels with get 25% of the color defined for your
point (not exactly sure how the calculation is done but it something
like what I outlined).
So not only do fractional points exits but when being mapped out to
devices for rendering even a non-fractional point (i.e. 2.0, yeah yeah
floating depending on precision and number involved may always be
fractional) may not fall 100% on or fully fill a pixel.
-Shawn
_______________________________________________
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