--- Alexandre Julliard <julliard(a)winehq.org> wrote:
William Poetra Yoga H <williampoetra(a)yahoo.com> writes:
Um... OK, so the correct code is to add 1 to the sides, right? I mean, to draw the 50x75 rectangle we would do:
r.left = 10; r.top = 10; r.right = 61; r.bottom = 86;
FillRect(hdc, &r, hbr);
No, FillRect behaves exactly like every other function in that respect, you should never have to worry about adding/subtracting one. Your example above is going to fill a 51x76 rectangle, not a 50x75 one.
Oh, so: r.left = 10; r.top = 10; r.right = 60; r.bottom = 85; FillRect(hdc, &r, hbr);
And for everything else when we have an x by y rectangle, we actually mean (x-1) by (y-1), is it OK to assume so? Am I correct?
Will fill a 50x75 rectangle, with width of (60-10) and height of (85-10), am I correct here? And, is my second assumption correct, btw? I mean, x = r.right - r.left + 1 y = r.bottom - r.top + 1 _______________________________ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com