Two.ArcSegment

Extends: Two.Path

Constructor

ArgumentDescription
xThe x position of the arc segment.
yThe y position of the arc segment.
innerRadiusThe inner radius value of the arc segment.
outerRadiusThe outer radius value of the arc segment.
startAngleThe start angle of the arc segment in Number.
endAngleThe end angle of the arc segment in Number.
resolutionThe number of vertices used to construct the arc segment.

fromObject

Returns: Two.ArcSegment

ArgumentDescription
objObject notation of a Two.ArcSegment to create a new instance

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

nota-bene

Works in conjunction with Two.ArcSegment.toObject

innerRadius

The size of the inner radius of the arc segment.

outerRadius

The size of the outer radius of the arc segment.

startAngle

The angle of one side for the arc segment.

endAngle

The angle of the other side for the arc segment.

copy

ArgumentDescription
arcSegmentThe reference Two.ArcSegment

Copy the properties of one Two.ArcSegment onto another.

clone

Returns: Two.ArcSegment

ArgumentDescription
parentThe parent group or scene to add the clone to.

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

toObject

Returns: Object

Return a JSON compatible plain object that represents the path.