# path

The path SVG element is the generic element to define a shape. All the basic shapes can be created with a path element.

Usually, this element is create with:

const path = parentElement.add('path')

It's possible create as a disconnected element with gySVG('path') and attach it to the SVG document with .attachTo().

More info: mdn (opens new window) | w3c (opens new window)

# .d()

path.d( _ )

Set this attribute defines the shape of the path.

  • argument: {} _

  • returns: {gySVGObject} The original object

const d = element.d();

Get the d current value.

  • returns: {}

# .pathLength()

path.pathLength( _ )

Set this attribute lets authors specify the total length for the path, in user units.

  • argument: {} _

  • returns: {gySVGObject} The original object

const pathLength = element.pathLength();

Get the pathLength current value.