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

View in English Always switch to English

SVGGeometryElement: getTotalLength() メソッド

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年1月.

SVGGeometryElement.getTotalLength() メソッドは、ユーザーエージェントが計算したパスの全長をユーザー単位で返します。

構文

js
getTotalLength()

引数

なし。

返値

浮動小数点数で、パス全体の長さをユーザー単位で示します。

仕様書

Specification
Scalable Vector Graphics (SVG) 2
# __svg__SVGGeometryElement__getTotalLength

ブラウザーの互換性