{{newin (日本語)|[[0.3.2 (日本語)|0.3.2]]|032|type=関数}}
Draws a rectangle.
== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.rectangle( mode, x, y, width, height )
</source>
=== 引数 ===
{{param (日本語)|DrawMode|mode|How to draw the rectangle.}}
{{param (日本語)|number|x|The position of top-left corner along the x-axis.}}
{{param (日本語)|number|y|The position of top-left corner along the y-axis.}}
{{param (日本語)|number|width|Width of the rectangle.}}
{{param (日本語)|number|height|Height of the rectangle.}}

=== 返値 ===
ありません。

== 関数 ==
{{newin (日本語)|[[0.10.0 (日本語)|0.10.0]]|100|type=異形}}
Draws a rectangle with rounded corners.
=== 概要 ===
<source lang="lua">
love.graphics.rectangle( mode, x, y, width, height, rx, ry, segments )
</source>
=== 引数 ===
{{param (日本語)|DrawMode|mode|How to draw the rectangle.}}
{{param (日本語)|number|x|The position of top-left corner along the x-axis.}}
{{param (日本語)|number|y|The position of top-left corner along the y-axis.}}
{{param (日本語)|number|width|Width of the rectangle.}}
{{param (日本語)|number|height|Height of the rectangle.}}
{{param (日本語)|number|rx|The x-axis radius of each round corner. Cannot be greater than half the rectangle's width.}}
{{param (日本語)|number|ry (rx)|The y-axis radius of each round corner. Cannot be greater than half the rectangle's height.}}
{{param (日本語)|number|segments (nil)|The number of segments used for drawing the round corners. A default amount will be chosen if no number is given.}}
=== 返値 ===
ありません。

== 用例 == 
=== Draws a rectangle at 20,50 with a width of 60 and a height of 120 ===
<source lang="lua">
function love.draw()
    love.graphics.rectangle("fill", 20, 50, 60, 120 )
end
</source>

== 関連 ==
* [[parent::love.graphics (日本語)]]
[[Category:Functions (日本語)]]
[[Sub-Category::Drawing (日本語)| ]]
{{#set:Description=Draws a rectangle.}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.rectangle}}