Nuestros voluntarios aún no han traducido este artículo al Español. Únete a nosotros y ayúdanos a traducirlo
SVG path interface
The SVGPathElement
interface corresponds to the <path>
element.
Interface overview
Also implement | SVGElement , SVGTests , SVGLangSpace , SVGExternalResourcesRequired , SVGStylable , SVGTransformable , SVGAnimatedPathData |
---|---|
Methods |
|
Properties |
|
Normative document | SVG 1.1 (2nd Edition) |
Properties
Name | Type | Description |
---|---|---|
pathLength |
SVGAnimatedNumber |
Corresponds to attribute pathLength on the given <path> element. |
Methods
Name & Arguments | Return | Description |
---|---|---|
getTotalLength () |
float | Returns the computed value for the total length of the path using the browser's distance-along-a-path algorithm, as a distance in the current user coordinate system. |
getPointAtLength(in float distance) |
SVGPoint |
Returns the (x,y) coordinate in user space which is distance units along the path, utilizing the browser's distance-along-a-path algorithm. |
getPathSegAtLength(in float distance) |
unsigned long | Returns the index into pathSegList which is distance units along the path, utilizing the user agent's distance-along-a-path algorithm. |
createSVGPathSegClosePath() |
SVGPathSegClosePath |
Returns a stand-alone, parentless SVGPathSegClosePath object. |
createSVGPathSegMovetoAbs(in float x, in float y) |
SVGPathSegMovetoAbs |
Returns a stand-alone, parentless SVGPathSegMovetoAbs object.Parameters:
|
createSVGPathSegMovetoRel(in float x, in float y) |
SVGPathSegMovetoRel |
Returns a stand-alone, parentless SVGPathSegMovetoRel object.Parameters:
|
createSVGPathSegLinetoAbs(in float x, in float y) |
SVGPathSegLinetoAbs |
Returns a stand-alone, parentless SVGPathSegLinetoAbs object.Parameters:
|
createSVGPathSegLinetoRel(in float x, in float y) |
SVGPathSegLinetoRel |
Returns a stand-alone, parentless SVGPathSegLinetoRel object.Parameters:
|
createSVGPathSegCurvetoCubicAbs(in float x, in float y, in float x1, in float y1, in float x2, in float y2) |
SVGPathSegCurvetoCubicAbs |
Returns a stand-alone, parentless SVGPathSegCurvetoCubicAbs object.Parameters:
|
createSVGPathSegCurvetoCubicRel(in float x, in float y, in float x1, in float y1, in float x2, in float y2) |
SVGPathSegCurvetoCubicRel |
Returns a stand-alone, parentless SVGPathSegCurvetoCubicRel object.Parameters:
|
createSVGPathSegCurvetoQuadraticAbs(in float x, in float y, in float x1, in float y1) |
SVGPathSegCurvetoQuadraticAbs |
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticAbs object.Parameters:
|
createSVGPathSegCurvetoQuadraticRel(in float x, in float y, in float x1, in float y1) |
SVGPathSegCurvetoQuadraticRel |
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticRel object.Parameters:
|
createSVGPathSegArcAbs(in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag) |
SVGPathSegArcAbs |
Returns a stand-alone, parentless SVGPathSegArcAbs object.Parameters:
|
createSVGPathSegArcRel(in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag) |
SVGPathSegArcRel |
Returns a stand-alone, parentless SVGPathSegArcRel object.Parameters:
|
createSVGPathSegLinetoHorizontalAbs(in float x) |
SVGPathSegLinetoHorizontalAbs |
Returns a stand-alone, parentless SVGPathSegLinetoHorizontalAbs object.Parameters:
|
createSVGPathSegLinetoHorizontalRel(in float x) |
SVGPathSegLinetoHorizontalRel |
Returns a stand-alone, parentless SVGPathSegLinetoHorizontalRel object.Parameters:
|
createSVGPathSegLinetoVerticalAbs(in float y) |
SVGPathSegLinetoVerticalAbs |
Returns a stand-alone, parentless SVGPathSegLinetoVerticalAbs object.Parameters:
|
createSVGPathSegLinetoVerticalRel(in float y) |
SVGPathSegLinetoVerticalRel |
Returns a stand-alone, parentless SVGPathSegLinetoVerticalRel object.Parameters:
|
createSVGPathSegCurvetoCubicSmoothAbs(in float x, in float y, in float x2, in float y2) |
SVGPathSegCurvetoCubicSmoothAbs |
Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothAbs object.Parameters
|
createSVGPathSegCurvetoCubicSmoothRel(in float x, in float y, in float x2, in float y2) |
SVGPathSegCurvetoCubicSmoothRel |
Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothRel object.Parameters
|
createSVGPathSegCurvetoQuadraticSmoothAbs(in float x, in float y) |
SVGPathSegCurvetoQuadraticSmoothAbs |
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothAbs object.Parameters:
|
createSVGPathSegCurvetoQuadraticSmoothRel(in float x, in float y) |
SVGPathSegCurvetoQuadraticSmoothRel |
Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothRel object.Parameters:
|
Specifications
Specification | Status | Comment |
---|---|---|
Scalable Vector Graphics (SVG) 1.1 (Second Edition) | Recommendation | Initial definition. |
Scalable Vector Graphics (SVG) 2 | Working Draft | Initial definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | (Yes)[1] | ? | ? | ? | ? |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | Not supported | (Yes)[1] | ? | ? | ? | ? | (Yes)[1] |
[1] As required by the latest version of the spec, most of this interface was deprecated in Chrome 47. Removed in Chrome 48. The properties and methods still supported inlcude: getTotalLength()
, getPointAtLength()
, and getPathSegAtLength()
.
See also
<path>
SVG Element