SVGPathElement - Web API 接口参考 编辑
SVG path interface
SVGPathElement
接口对应于<path>
元素。
接口概览
又作用于 | SVGElement 、 SVGTests 、 SVGLangSpace 、 SVGExternalResourcesRequired 、 SVGStylable 、 SVGTransformable 、 SVGAnimatedPathData |
---|---|
方法 |
|
属性 |
|
规范文档 | SVG 1.1 (2nd Edition) |
属性
名称 | 类型 | 描述 |
---|---|---|
pathLength | SVGAnimatedNumber | 对应于给定<path> 元素的pathLength 属性。 |
方法
名称和参数 | 返回 | 描述 |
---|---|---|
getTotalLength () | 浮点数 | 返回用浏览器的 distance-along-a-path 算法计算得出的路径全长,匹配当前用户坐标系中的长度。 |
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) | 无符号长整型 | 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:
|
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 未实现 | ? | ? | ? | ? |
参见
<path>
SVG Element
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论