Constructor
new SVGPathCCommand(x1, y1, x2, y2, x, y, isRelative)
Create a new SVGPathCCommand object
Parameters:
| Name | Type | Description |
|---|---|---|
x1 |
number |
The x coordinate of the first control point |
y1 |
number |
The y coordinate of the first control point |
x2 |
number |
The x coordinate of the second control point |
y2 |
number |
The y coordinate of the second control point |
x |
number |
The x coordinate for the command's end point |
y |
number |
The y coordinate for the command's end point |
isRelative |
boolean |
Indicates if the command is relative or not |
- Source:
Extends
Members
beginControl :SVGCoordinates
The coordinate of the first control point
coordinates :SVGCoordinates
Indicate the coordinates of the command end point
- Overrides:
- Source:
endControl :SVGCoordinates
The coordinate of the second control point
isRelative :boolean
Indicate if the command is relative or absolute
- Overrides:
- Source:
x :number
Direct access the the command end point x coordinate
- Overrides:
- Source:
x1 :number
Direct access to the first control point x coordinate
x2 :number
Direct access to the second control point x coordinate
y :number
Direct access the the command end point y coordinate
- Overrides:
- Source:
y1 :number
Direct access to the first control point y coordinate
y2 :number
Direct access to the second control point y coordinate
Methods
(generator) @@iterator()
Implementation of the Iterator protocol.
For the CUBIC BEZIER command, the provided iterable will yield, in order:
- The command name (either
'c'or'C') - The
x1start control point's coordinate - The
y1start control point's coordinate - The
x2end control point's coordinate - The
y2end control point's coordinate - The
xend point's coordinate - The
yend point's coordinate
- Overrides:
- Source:
toAbsolute(origin) → {SVGPathCommand}
Mutate a relative command to make it absolute
Parameters:
| Name | Type | Description |
|---|---|---|
origin |
SVGCoordinates |
The coordinates to resolve the current relative coordinates |
- Overrides:
- Source:
toJSON() → {Array}
Turn the command into a proper JSON representation
A command JSON representation is an Array containing all the components
of the command in the same order as the one defined by the SVG2
specification.
- Overrides:
- Source:
toRelative(origin) → {SVGPathCommand}
Mutate an absolute command to make it relative
Parameters:
| Name | Type | Description |
|---|---|---|
origin |
SVGCoordinates |
The coordinates to be relative to. |
- Overrides:
- Source:
toString() → {string}
Turn the command into a proper string representation
A command string representation is a valid SVG path command string.
- Overrides:
- Source: