Constructor
new SVGPathZCommand()
Create a new SVGPathZCommand object
IMPORTANT: Due to their nature, all END commands will respond with a
0,0end point's coordinate tuple (the actual ending point of the command is the one of the latest previous MOVE command) and they are always considered being relative.
- Source:
Extends
Members
coordinates :SVGCoordinates
Indicate the coordinates of the command end point
- Overrides:
- Source:
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:
y :number
Direct access the the command end point y coordinate
- Overrides:
- Source:
Methods
(generator) @@iterator()
Implementation of the Iterator protocol.
For the END command the provided iterable will yield, in order:
- The command name
'z'
- 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: