Arc

Represents an arc with a set center, direction, angular range, and X/Y radius.

anticlockwise boolean

The anticlockwise flag of the arc.

center Point

The center point of the arc.

endAngle number

Gets the end angle of the arc in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right".

radiusX number

Gets the X radius of the arc.

radiusY number

Gets the Y radius of the arc.

startAngle number

Gets the start angle of the arc in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right".

Constructors

Arc (center: Point | number[], options?: ArcOptions)

Creates a new Arc instance.

Parameters

center Point | number[]

The center point of the arc.

options? ArcOptions

The options that describe the arc.

Methods

addObserver

Adds an observer to be notified for changes.

Parameters

observer GeometryObserver

The observer to add.

Returns

Arc - The current Arc instance.

bbox

Returns the bounding box of this arc after applying the specified transformation matrix.

Parameters

matrix Matrix

The transformation matrix to apply.

Returns

Rect - The bounding box after applying the transformation matrix.

getAnticlockwise

Gets the anticlockwise flag of the arc.

Returns

boolean - The anticlockwise flag of the arc.

getCenter

Gets the center location of the arc.

Returns

Point - The location of the arc center.

getEndAngle

Gets the end angle of the arc in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right".

Returns

number - The end angle of the arc.

getRadiusX

Gets the X radius of the arc.

Returns

number - The X radius of the arc.

getRadiusY

Gets the Y radius of the arc.

Returns

number - The Y radius of the arc.

getStartAngle

Gets the start angle of the arc in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right".

Returns

number - The start angle of the arc.

observers

Returns the list of observers.

Returns

GeometryObserver[] - The current observers.

pointAt

Gets the location of a point on the circumference of the arc at a given angle.

Parameters

angle number

The angle in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right". Negative values or values greater than 360 are normalized.

Returns

Point - The point on the circumference of the arc.

removeObserver

Stops notifying the specified observer for changes.

Parameters

observer GeometryObserver

The observer to remove.

Returns

Arc - The current Arc instance.

resume

Resumes the notification to all observers for changes.

Returns

Arc - The current Arc instance.

setAnticlockwise

Sets the anticlockwise flag of the arc.

Parameters

value boolean

The new anticlockwise value.

Returns

Arc - The current arc instance.

setCenter

Sets the center location of the arc.

Parameters

value Point | number[]

The new arc center.

Returns

Arc - The current Arc instance.

setEndAngle

Sets the end angle of the arc in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right".

Parameters

value number

The new end angle of the arc.

Returns

Arc - The current Arc instance.

setRadiusX

Sets the X radius of the arc.

Parameters

value number

The new X radius of the arc.

Returns

Arc - The current Arc instance.

setRadiusY

Sets the Y radius of the arc.

Parameters

value number

The new Y radius of the arc.

Returns

Arc - The current Arc instance.

setStartAngle

Sets the start angle of the arc in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right".

Parameters

value number

The new start angle of the arc.

Returns

Arc - The current Arc instance.

suspend

Suspends the change notifications to all observers.

Returns

Arc - The current Arc instance.

 /