SVGPathACommand

SVGPathACommand

Class representing a MOVE command

Constructor

new SVGPathACommand(rx, ry, angle, large, clockwise, x, y, isRelative)

Create a new SVGPathACommand object

Parameters:
Name Type Description
rx number

The length of the arc radius along the x-axis

ry number

The length of the arc radius along the y-axis

angle number

The rotation of the arc along the x-axis

large boolean

Indicates if the arc segment is the large arc

clockwise boolean

Indicates if the arc segment is drawn clockwise

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

angle :number

The rotation of the arc along the x-axis

Source:

clockwise :boolean

Defines if the arc segment is drawn clockwise

Source:

coordinates :SVGCoordinates

Indicate the coordinates of the command end point

Overrides:
Source:

isRelative :boolean

Indicate if the command is relative or absolute

Overrides:
Source:

large :boolean

Defines if the arc segment is the large arc

Source:

rx :number

The length of the arc radius along the x-axis

Source:

ry :number

The length of the arc radius along the y-axis

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 ARC command, the provided iterable will yield, in order:

  1. The command name (either 'a' or 'A')
  2. The rx radius length
  3. The ry radius length
  4. The angle x-axis orientation
  5. The large flag as a number
  6. The clockwise flag as a number
  7. The x end point's coordinate
  8. The y end 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: