# Two.RoundedRectangle

Extends: Two.Path

# Constructor

Argument Description
x The x position of the rounded rectangle.
y The y position of the rounded rectangle.
width The width value of the rounded rectangle.
height The width value of the rounded rectangle.
radius The radius value of the rounded rectangle.
resolution The number of vertices used to construct the rounded rectangle.

# Properties

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

# fromObject

Returns: Two.RoundedRectangle

Argument Description
obj Object notation of a Two.RoundedRectangle to create a new instance

Create a new Two.RoundedRectangle from an object notation of a Two.RoundedRectangle.

nota-bene

Works in conjunction with Two.RoundedRectangle.toObject

# width

The width of the rounded rectangle.

# height

The height of the rounded rectangle.

# radius

The size of the radius of the rounded rectangle.

# copy

Argument Description
roundedRectangle The reference Two.RoundedRectangle

Copy the properties of one Two.RoundedRectangle onto another.

# clone

Returns: Two.RoundedRectangle

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.RoundedRectangle with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.