このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

SVGPathElement

Baseline 広く利用可能 *

この機能は広く実装されており、多くのバージョンの端末やブラウザーで動作します。2015年7月以降、すべてのブラウザーで利用可能です。

* この機能の一部は、対応レベルが異なる場合があります。

SVGPathElement インターフェイスは <path> 要素に対応します。

EventTarget Node Element SVGElement SVGGraphicsElement SVGGeometryElement SVGPathElement

メモ: 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 オブジェクトを返します。

仕様書

仕様書
Scalable Vector Graphics (SVG) 2
# InterfaceSVGPathElement

ブラウザーの互換性

関連情報