SVGPathElement
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
* Some parts of this feature may have varying levels of support.
SVGPathElement インターフェイスは <path> 要素に対応します。
メモ:
SVG 2 では、 getPathSegAtLength() および createSVGPathSeg* メソッドが削除され、pathLength プロパティと getTotalLength() および getPointAtLength() メソッドが SVGGeometryElement へ移動されました。
インスタンスプロパティ
このインターフェイスには、親である SVGGeometryElement から継承したプロパティがあります。
SVGPathElement.pathLength読取専用-
このプロパティは
pathLength属性を反映します。
インスタンスメソッド
このインターフェイスには、親である SVGGeometryElement から継承したメソッドもあります。
SVGPathElement.getPathData()-
パスデータに対応するパス区間の並びを返します。オプションで値と区間型を正規化します。
SVGPathElement.getPointAtLength()-
パス上の指定された位置にある点を返します。
SVGPathElement.getTotalLength()-
ユーザーエージェントが計算したパスの全長を、ユーザー単位で返します。
SVGPathElement.setPathData()-
パス区間の並びを新しいパスデータとして設定します。
SVGPathElement.getPathSegmentAtLength()-
パス上の指定された位置にある区間を返します。
非推奨のメソッド
SVGPathElement.getPathSegAtLength()-
ユーザーエージェントの distance-along-a-path アルゴリズムを用いて、
pathSegList内のインデックスを表す符号なし長整数を返します。 SVGPathElement.createSVGPathSegClosePath()-
独立した、親のない
SVGPathSegClosePathオブジェクトを返します。 SVGPathElement.createSVGPathSegMovetoAbs()-
独立した、親のない
SVGPathSegMovetoAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegMovetoRel()-
独立した、親のない
SVGPathSegMovetoRelオブジェクトを返します。 SVGPathElement.createSVGPathSegLinetoAbs()-
独立した、親のない
SVGPathSegLinetoAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegLinetoRel()-
独立した、親のない
SVGPathSegLinetoRelオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoCubicAbs()-
独立した、親のない
SVGPathSegCurvetoCubicAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoCubicRel()-
独立した、親のない
SVGPathSegCurvetoCubicRelオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoQuadraticAbs()-
独立した、親のない
SVGPathSegCurvetoQuadraticAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoQuadraticRel()-
独立した、親のない
SVGPathSegCurvetoQuadraticRelオブジェクトを返します。 SVGPathElement.createSVGPathSegArcAbs()-
独立した、親のない
SVGPathSegArcAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegArcRel()-
独立した、親のない
SVGPathSegArcRelオブジェクトを返します。 SVGPathElement.createSVGPathSegLinetoHorizontalAbs()-
独立した、親のない
SVGPathSegLinetoHorizontalAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegLinetoHorizontalRel()-
独立した、親のない
SVGPathSegLinetoHorizontalRelオブジェクトを返します。 SVGPathElement.createSVGPathSegLinetoVerticalAbs()-
独立した、親のない
SVGPathSegLinetoVerticalAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegLinetoVerticalRel()-
独立した、親のない
SVGPathSegLinetoVerticalRelオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs()-
独立した、親のない
SVGPathSegCurvetoCubicSmoothAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel()-
独立した、親のない
SVGPathSegCurvetoCubicSmoothRelオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs()-
独立した、親のない
SVGPathSegCurvetoQuadraticSmoothAbsオブジェクトを返します。 SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel()-
独立した、親のない
SVGPathSegCurvetoQuadraticSmoothRelオブジェクトを返します。
仕様書
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> # InterfaceSVGPathElement> |
ブラウザーの互換性
関連情報
<path>SVG 要素