rectangle drawing
Posted: Mon Aug 13, 2012 10:03 am
I draw an image with (x, y, w, h)=(0, 0, 100, 100)
But in order to draw a border around it(from its upper left corner to lower right corner) I need to draw a rectangle with
(x+0.5, y+0.5, w-1, h-1) = (0.5, 0.5, 99, 99)
I understand pixel grid for lines are the center of the pixels, it is mentioned in the wiki and makes sense.
It says nothing on the wiki about the pixel grid for the rectangle. Also, It is a little awkward for the rectangle
But in order to draw a border around it(from its upper left corner to lower right corner) I need to draw a rectangle with
(x+0.5, y+0.5, w-1, h-1) = (0.5, 0.5, 99, 99)
I understand pixel grid for lines are the center of the pixels, it is mentioned in the wiki and makes sense.
It says nothing on the wiki about the pixel grid for the rectangle. Also, It is a little awkward for the rectangle