Shorthand for creating rectangular [[PolygonShape]]s. 

By default, the local origin is located at the '''center''' of the rectangle as opposed to the top left for graphics.

== Function ==
{{newin|[[0.8.0]]|080|type=variants|plural=yes}}
=== Synopsis ===
<source lang="lua">
shape = love.physics.newRectangleShape( width, height )
</source>
=== Arguments ===
{{param|number|width|The width of the rectangle.}}
{{param|number|height|The height of the rectangle.}}
=== Returns ===
{{param|PolygonShape|shape|A new PolygonShape.}}

== Function ==
=== Synopsis ===
<source lang="lua">
shape = love.physics.newRectangleShape( x, y, width, height, angle )
</source>

=== Arguments ===
{{param|number|x|The offset along the x-axis.}}
{{param|number|y|The offset along the y-axis.}}
{{param|number|width|The width of the rectangle.}}
{{param|number|height|The height of the rectangle.}}
{{param|number|angle (0)|The initial angle of the rectangle.}}
=== Returns ===
{{param|PolygonShape|shape|A new PolygonShape.}}

== Function ==
{{oldin|[[0.8.0]]|080|type=variant}}
=== Synopsis ===
<source lang="lua">
s = love.physics.newRectangleShape( body, x, y, width, height, angle )
</source>
=== Arguments ===
{{param|Body|body|The Body to attach the Shape to.}}
{{param|number|x|The offset along the x-axis.}}
{{param|number|y|The offset along the y-axis.}}
{{param|number|width|The width of the rectangle.}}
{{param|number|height|The height of the rectangle.}}
{{param|number|angle (0)|The initial angle of the rectangle.}}
=== Returns ===
{{param|PolygonShape|s|A new PolygonShape.}}

== See Also ==
* [[parent::love.physics]]
* [[Constructs::PolygonShape]]
* [[Constructs::Shape]]
[[Category:Functions]]
{{#set:Description=Shorthand for creating rectangular [[PolygonShape]]s.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.physics.newRectangleShape}}