Two.RoundedRectangle

Extends: Two.Path

Constructor

ArgumentDescription
xThe x position of the rounded rectangle.
yThe y position of the rounded rectangle.
widthThe width value of the rounded rectangle.
heightThe width value of the rounded rectangle.
radiusThe radius value of the rounded rectangle.
resolutionThe number of vertices used to construct the rounded rectangle.

fromObject

Returns: Two.RoundedRectangle

ArgumentDescription
objObject 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

radius

The size of the radius of the rounded rectangle.

copy

ArgumentDescription
roundedRectangleThe reference Two.RoundedRectangle

Copy the properties of one Two.RoundedRectangle onto another.

clone

Returns: Two.RoundedRectangle

ArgumentDescription
parentThe 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.