Coordinates of Pixels
Coordinates of Pixels
- Subject: Coordinates of Pixels
- From: Richard Somers <email@hidden>
- Date: Wed, 18 Jul 2007 14:06:54 -0600
This may be elementary computer graphics but I can't seem to find the
answer.
Consider a rectangular matrix of pixels in device space with the
origin at the lower left corner. Is the pixel at the lower left
corner pixel 0, 0 or pixel 1, 1?
When mapping from user space to device space (userSpaceScaleFactor =
1.0) are pixels considered located at even integer boundaries or half
way in-between?
The Cocoa Drawing Guide example Listing 3-1 for pixel-exact drawing
adjusts the origin of the drawn rectangle by 0.5 in x and y. This
would lead you to the conclusion that the center of the pixels fall
on 0.5 increment boundaries when overlaid with a floating point
coordinate system from user space. Is this a correct conclusion?
Regards, Richard
_______________________________________________
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