Page 1 of 1

draw rectangle parameters

Posted: Mon Aug 11, 2008 7:34 am
by Mr. Strange
I tried to draw a rectangle using the parameters listed in the documentation:

love.graphics.rectangle( x, y, w, h )

But that didn't work, because it actually expects a fifth argument, like this:

love.graphics.rectangle( bOutline, x, y, w, h )

Where bOutline == 1 draws the box as just a perimeter, and anything else (so it seems) draws the rectangle as a filled box.

Just thought I'd mention this, as I've found the documentation to be very useful thus far, and this is the only place that tripped me up.

--Mr. Strange

Re: draw rectangle parameters

Posted: Mon Aug 11, 2008 10:45 am
by Jake
This tripped me up aswell but you can check the demos to see how it's done.

The argument should actually be love.draw_line or love.draw_fill says the Constants page.

Re: draw rectangle parameters

Posted: Mon Aug 11, 2008 2:18 pm
by Merkoth
Image
Image

But I agree it should be corrected anyway n_nU

Re: draw rectangle parameters

Posted: Mon Aug 11, 2008 4:11 pm
by rude
Thanks, Mr. Strange.