SVGPathElement
The SVGPathElement interface corresponds to the <path> element.
Note: In SVG 2 the getPathSegAtLength() and createSVGPathSeg* methods were removed and the pathLength property and the getTotalLength() and getPointAtLength() methods were moved to SVGGeometryElement.
Properties
This interface inherits properties from its parent, SVGGeometryElement.
Methods
This interface also inherits methods from its parent, SVGGeometryElement.
-
SVGPathElement.getPathSegAtLength() -
Returns an unsigned long representing the index within the
pathSegListutilizing the user agent's distance-along-a-path algorithm. -
SVGPathElement.createSVGPathSegClosePath() -
Returns a stand-alone, parentless
SVGPathSegClosePathobject. -
SVGPathElement.createSVGPathSegMovetoAbs() -
Returns a stand-alone, parentless
SVGPathSegMovetoAbsobject. -
SVGPathElement.createSVGPathSegMovetoRel() -
Returns a stand-alone, parentless
SVGPathSegMovetoRelobject. -
SVGPathElement.createSVGPathSegLinetoAbs() -
Returns a stand-alone, parentless
SVGPathSegLinetoAbsobject. -
SVGPathElement.createSVGPathSegLinetoRel() -
Returns a stand-alone, parentless
SVGPathSegLinetoRelobject. -
SVGPathElement.createSVGPathSegCurvetoCubicAbs() -
Returns a stand-alone, parentless
SVGPathSegCurvetoCubicAbsobject. -
SVGPathElement.createSVGPathSegCurvetoCubicRel() -
Returns a stand-alone, parentless
SVGPathSegCurvetoCubicRelobject. -
SVGPathElement.createSVGPathSegCurvetoQuadraticAbs() -
Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticAbsobject. -
SVGPathElement.createSVGPathSegCurvetoQuadraticRel() -
Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticRelobject. -
SVGPathElement.createSVGPathSegArcAbs() -
Returns a stand-alone, parentless
SVGPathSegArcAbsobject. -
SVGPathElement.createSVGPathSegArcRel() -
Returns a stand-alone, parentless
SVGPathSegArcRelobject. -
SVGPathElement.createSVGPathSegLinetoHorizontalAbs() -
Returns a stand-alone, parentless
SVGPathSegLinetoHorizontalAbsobject. -
SVGPathElement.createSVGPathSegLinetoHorizontalRel() -
Returns a stand-alone, parentless
SVGPathSegLinetoHorizontalRelobject. -
SVGPathElement.createSVGPathSegLinetoVerticalAbs() -
Returns a stand-alone, parentless
SVGPathSegLinetoVerticalAbsobject. -
SVGPathElement.createSVGPathSegLinetoVerticalRel() -
Returns a stand-alone, parentless
SVGPathSegLinetoVerticalRelobject. -
SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs() -
Returns a stand-alone, parentless
SVGPathSegCurvetoCubicSmoothAbsobject. -
SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel() -
Returns a stand-alone, parentless
SVGPathSegCurvetoCubicSmoothRelobject. -
SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs() -
Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticSmoothAbsobject. -
SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel() -
Returns a stand-alone, parentless
SVGPathSegCurvetoQuadraticSmoothRelobject.
Specifications
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
SVGPathElement |
1 |
12 |
1.5 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
createSVGPathSegArcAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegArcRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegClosePath |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoCubicAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoCubicRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoCubicSmoothAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoCubicSmoothRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoQuadraticAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoQuadraticRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoQuadraticSmoothAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegCurvetoQuadraticSmoothRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegLinetoAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegLinetoHorizontalAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegLinetoHorizontalRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegLinetoRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegLinetoVerticalAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegLinetoVerticalRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegMovetoAbs |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
createSVGPathSegMovetoRel |
1-48 |
12-79 |
1.5-59 |
9 |
≤12.1-35 |
3 |
≤37-48 |
18-48 |
4-59 |
≤12.1-35 |
1 |
1.0-5.0 |
getPathSegAtLength |
1-62 |
12-79 |
1.5 |
9 |
≤12.1-49 |
3 |
≤37-62 |
18-62 |
4 |
≤12.1-46 |
1 |
1.0-8.0 |
See also
-
<path>SVG Element
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGPathElement