Re: Coordinates for lines vs points (and pixel grid alignment for points)
Posted: Mon May 03, 2021 12:39 pm
It's not that difficult or weird actually.
Rectangles and lines drawn at 0,0 will be blurry and should be placed at .5,.5 instead because that's how the coordinate system works.
Images and text drawn at .5,.5 will be blurry and should be placed at 0,0 instead because that's how the coordinate system works.
Meshes drawn at 0,0 will not be blurry. Meshes drawn at .5,.5 won't be blurry either, but will look a little bit weird. Unless they have a texture, then you gotta add .5. Or not. I can't remember. Because that's how the coordinate system works.
There are perfectly good explanations for why things are this way. It apparently all boils down to the fact that that's the way the coordinate system works and the best APIs are those with leaky abstractions.
Rectangles and lines drawn at 0,0 will be blurry and should be placed at .5,.5 instead because that's how the coordinate system works.
Images and text drawn at .5,.5 will be blurry and should be placed at 0,0 instead because that's how the coordinate system works.
Meshes drawn at 0,0 will not be blurry. Meshes drawn at .5,.5 won't be blurry either, but will look a little bit weird. Unless they have a texture, then you gotta add .5. Or not. I can't remember. Because that's how the coordinate system works.
There are perfectly good explanations for why things are this way. It apparently all boils down to the fact that that's the way the coordinate system works and the best APIs are those with leaky abstractions.