draw rectangle parameters

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Mr. Strange
Party member
Posts: 101
Joined: Mon Aug 11, 2008 5:19 am

draw rectangle parameters

Post 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
User avatar
Jake
Prole
Posts: 27
Joined: Sun Jul 20, 2008 2:01 pm

Re: draw rectangle parameters

Post 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.
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: draw rectangle parameters

Post by Merkoth »

Image
Image

But I agree it should be corrected anyway n_nU
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: draw rectangle parameters

Post by rude »

Thanks, Mr. Strange.
Post Reply

Who is online

Users browsing this forum: No registered users and 84 guests