Difference between revisions of "love.graphics.rectangle"

(Examples)
m
Line 26: Line 26:
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Sub-Category::Drawing| ]]
 
{{#set:Description=Draws a rectangle.}}
 
{{#set:Description=Draws a rectangle.}}
 
{{#set:Since=000}}
 
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.rectangle}}
 
{{i18n|love.graphics.rectangle}}

Revision as of 00:19, 29 March 2013

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.

Modes

fill mode
fills the rectangle
line mode
only draws an outline

Examples

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

See Also


Other Languages