scascio (18th September 2009)
A box of height and width of 40 at 0,0 takes pixels 0-39 to draw. Now, if you draw a box that fits in that, and you measure, you'll get pixels 1-38 as the difference between the lines. This creates a problem, because your drawn with is no where near the 40 width your rect indicated. What you have to do is pic the next-highest pixel. So you end up drawing on 0 and 40. But the 40th pixel is clipped. I've seen this done in many different packages and it is "right".
Bookmarks