web api interface
SVGPathElement
The SVGPathElement interface corresponds to the <path> element.
[!NOTE] In SVG 2 the
getPathSegAtLength()andcreateSVGPathSeg*methods were removed and thepathLengthproperty and thegetTotalLength()andgetPointAtLength()methods were moved toSVGGeometryElement.
Instance properties
This interface inherits properties from its parent, SVGGeometryElement.
pathLengthRead only- : This property reflects the
pathLengthattribute.
- : This property reflects the
Instance methods
This interface also inherits methods from its parent, SVGGeometryElement.
getPathData()Experimental- : Returns the sequence of path segments that corresponds to the path data, optionally normalizing the values and segment types.
getPointAtLength()- : Returns the point at a given distance along the path.
getTotalLength()- : Returns the user agent’s computed value for the total length of the path in user units.
setPathData()Experimental- : Sets the sequence of path segments as the new path data.
getPathSegmentAtLength()Experimental- : Returns the segment at a given distance along the path.
Deprecated methods
getPathSegAtLength()Deprecated- : Returns an unsigned long representing the index within the
pathSegListutilizing the user agent’s distance-along-a-path algorithm.
- : Returns an unsigned long representing the index within the
createSVGPathSegClosePath()Deprecated- : Returns a stand-alone, parentless
SVGPathSegClosePathobject.
- : Returns a stand-alone, parentless
createSVGPathSegMovetoAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegMovetoAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegMovetoRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegMovetoRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegLinetoAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegLinetoAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegLinetoRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegLinetoRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoCubicAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoCubicAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoCubicRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoCubicRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoQuadraticAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoQuadraticRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegArcAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegArcAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegArcRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegArcRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegLinetoHorizontalAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegLinetoHorizontalAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegLinetoHorizontalRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegLinetoHorizontalRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegLinetoVerticalAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegLinetoVerticalAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegLinetoVerticalRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegLinetoVerticalRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoCubicSmoothAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoCubicSmoothAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoCubicSmoothRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoCubicSmoothRelobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoQuadraticSmoothAbs()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticSmoothAbsobject.
- : Returns a stand-alone, parentless
createSVGPathSegCurvetoQuadraticSmoothRel()Deprecated- : Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticSmoothRelobject.
- : Returns a stand-alone, parentless
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
<path>SVG Element