Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
getPathSegmentAtLength() は SVGPathElement インターフェイスのメソッドで、このパス上の指定された位置にあるパス区間を返します。
このパス上の位置を、先頭からの距離を示す数値です。
パス区間オブジェクトです。有効な区間がない場合は、null を返します。
区間オブジェクトには、以下のようなプロパティがあります。
typeパスコマンドです。
valuesコマンドに対応した引数の入った配列または値です。
次の <path> 要素を考えてみましょう。これは正方形を描画します。
getPathSegmentAtLength() メソッドは、パスに沿って 65px の位置にある v64 区間を表すオブジェクトを返します。
| SVG Paths # __svg__SVGPathElement__getPathSegmentAtLength |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年12月4日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.