##### Views

- Page
- Discussion
- View source
- History

# love.graphics.rectangle

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

- love.graphics

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/love.graphics.rectangle"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties