Functions For Helping FillRect

William Poetra Yoga H williampoetra at yahoo.com
Mon Oct 25 20:26:30 CDT 2004


--- Alexandre Julliard <julliard at winehq.org> wrote:

> William Poetra Yoga H <williampoetra at 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



More information about the wine-devel mailing list