Constructor
new SVGPathLCommand(x, y, isRelative)
Parameters:
| Name | Type | Description |
|---|---|---|
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 is the command is relative or not |
Extends
Members
coordinates :SVGCoordinates
Indicate the coordinates of the command end point
- Inherited From:
- Source:
isRelative :boolean
Indicate if the command is relative or absolute
- Inherited From:
- Source:
x :number
Direct access the the command end point x coordinate
- Inherited From:
- Source:
y :number
Direct access the the command end point y coordinate
- Inherited From:
- Source:
Methods
(generator) @@iterator()
Implementation of the Iterator protocol.
For the LINE command the provided iterable will yield, in order:
- The command name (either
'l'or'L') - The
xcoordinate - The
ycoordinate
- 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 |
- Inherited From:
- 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.
- Inherited From:
- Source:
toRelative(origin) → {SVGPathCommand}
Mutate an absolute command to make it relative
Parameters:
| Name | Type | Description |
|---|---|---|
origin |
SVGCoordinates |
The coordinates to be relative to. |
- Inherited From:
- Source:
toString() → {string}
Turn the command into a proper string representation
A command string representation is a valid SVG path command string.
- Inherited From:
- Source: