# Two.Rectangle
Extends: Two.Path
# Constructor
Argument | Description |
---|---|
x | The x position of the rectangle. |
y | The y position of the rectangle. |
width | The width value of the rectangle. |
height | The width value of the rectangle. |
# origin
Two.Rectangle.origin
A two-component vector describing the origin offset to draw the rectangle. Default is 0, 0
.
# clone
Two.Rectangle.clone
Returns: Two.Rectangle
Argument | Description |
---|---|
parent | The parent group or scene to add the clone to. |
Create a new instance of Two.Rectangle with the same properties of the current path.
# toObject
Two.Rectangle.toObject
Returns: Object
Return a JSON compatible plain object that represents the path.
← Two.Line Two.Ellipse →