Difference between revisions of "love.graphics.rectangle"

m (Add newin info.)
m (Add PrettySince field. Remove newin box.)
Line 1: Line 1:
{{newin|[[0.3.2]]|032|type=function}}
 
 
Draws a rectangle.
 
Draws a rectangle.
 
== Function ==
 
== Function ==
Line 27: Line 26:
 
{{#set:Description=Draws a rectangle.}}
 
{{#set:Description=Draws a rectangle.}}
 
{{#set:Since=000}}
 
{{#set:Since=000}}
 +
{{#set:PrettySince=0.3.2}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.rectangle}}
 
{{i18n|love.graphics.rectangle}}

Revision as of 13:05, 22 March 2015

Draws a rectangle.

Function

Synopsis

love.graphics.rectangle( mode, x, y, width, height )

Arguments

DrawMode mode
How to draw the rectangle.
number x
The position of top-left corner along x-axis.
number y
The position of top-left corner along y-axis.
number width
Width of the rectangle.
number height
Height of the rectangle.

Returns

Nothing.

Examples

Draws a rectangle at 20,50 with a width of 60 and a height of 120

 love.graphics.rectangle("fill", 20, 50, 60, 120 )

See Also



Other Languages