# 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.

# Properties

A list of properties that are on every Two.Rectangle.

# width

The size of the width of the rectangle.

# height

The size of the height of the rectangle.

# origin

A two-component vector describing the origin offset to draw the rectangle. Default is 0, 0.

# 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

Returns: Object

Return a JSON compatible plain object that represents the path.