リファレンス · KanjiVG由来の筆順:描く、描いた漢字から探す
pathPoints関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Points along a path: its curves cut into steps straight pieces each. Reads what KanjiVG writes: M, C and S, absolute and relative.
インポート
import { pathPoints } from "@johnmorrisdotca/jisho/strokes";
定義
function pathPoints(path: string, steps?: number): Point[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
path | string | An SVG path of a stroke. |
steps (省略可) | number | How many pieces each curve is cut into. 6 unless given. |
戻り値
Point[]
The points, from where the stroke starts to where it ends.
例
import { pathPoints } from "@johnmorrisdotca/jisho/strokes";
console.log(pathPoints("M0,0c10,0,20,0,30,0", 3).length); // 44出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。