new arc(options){arc}
Initializes a new arc instance.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Options used to customize the arc
|
Returns:
Type | Description |
---|---|
arc | A new arc instance. |
Requires
Members
-
readonlycalculatedPathString
-
The svg drawing calculated based on the prperties of this instance
-
cxNumber
-
The center of the arc along the x-axis
-
cyNumber
-
The center of the arc along the y-axis
-
dasharray*
-
The stroke-dasharray of the path
-
dashoffset*
-
The stroke-dashoffset of the path
-
readonlyelSVGElement
-
The path element associated with this instance
-
endNumber
-
The ending point of the arc along its circle in degrees
-
fillString
-
The arc's fill color
-
readonlyidString
-
The id of this instance's path element
-
readonlylargeArcFlagNumber
-
The largeArcFlag value used by the svg drawing command to produce the arc
-
lengthNumber
-
The length of the arc in degrees
-
readonlyparentSVGElement
-
The parent of the path element
-
rNumber
-
The radius of the arc
-
rotationNumber
-
The rotation of the arc in degrees
-
rxNumber
-
The x-axis radius of the arc
-
ryNumber
-
The y-axis radius of the arc
-
sliceString
-
Control how much of the path's stroke is drawn. Space-delimited values define a slice, ie '10 30'. A single value asserts 0 as the starting value. Accepts percentages for relative values
-
startNumber
-
The starting point of the arc along its circle in degrees
-
strokeString
-
The arc's stroke color
-
strokeWidthNumber
-
The arc's stroke width
-
sweepFlagNumber
-
The sweepFlag value used by the svg drawing command to produce the arc
Methods
-
staticarc.calculatePath(cx, cy, rx, ry, start, length, sweepFlag){String}
-
Returns the svg drawing command to produce the specified
Name Type Description cx
Number The center of the arc along the x-axis cy
Number The center of the arc along the y-axis rx
Number The x-axis radius of the arc ry
Number The y-axis radius of the arc start
Number The starting point of the arc along its circle in degrees length
Number The length of the arc in degrees sweepFlag
Number The sweepFlag value used in the calculated svg drawing command Returns:
Type Description String The svg drawing command -
staticarc.flatten(value){Number}
-
The provided value flattened in the range of 0-360
Name Type Description value
Number The value to flatten Returns:
Type Description Number The flattened value -
staticarc.getElInstance(el){arc}
-
returns the arc instance associated with the provided element's id attribute
Name Type Description el
Element The element with the lookup id Returns:
Type Description arc The associate arc, if it exists -
staticarc.getInstance(id){arc}
-
returns the arc instance associated with the id
Name Type Description id
String The lookup id Returns:
Type Description arc The associate arc, if it exists -
calculatePath(cx, cy, rx, ry, start, length, sweepFlag){String}
-
Returns the svg drawing command to produce the specified
Name Type Description cx
Number The center of the arc along the x-axis cy
Number The center of the arc along the y-axis rx
Number The x-axis radius of the arc ry
Number The y-axis radius of the arc start
Number The starting point of the arc along its circle in degrees length
Number The length of the arc in degrees sweepFlag
Number The sweepFlag value used in the calculated svg drawing command Returns:
Type Description String The svg drawing command