PathInterpolator QML Type
パスに沿って手動でアニメートする方法を指定します。詳細...
| Import Statement: | import QtQuick |
プロパティ
詳細説明
PathInterpolator は、パスに沿った特定のprogress に対して、x 、y 、angle の情報を提供します。
次の例では、緑色の矩形をベジェパスに沿ってアニメートします。
import QtQuick Rectangle { width: 400 height: 400 PathInterpolator { id: motionPath path: Path { startX: 0; startY: 0 PathCubic { x: 350; y: 350 control1X: 350; control1Y: 0 control2X: 0; control2Y: 350 } } NumberAnimation on progress { from: 0; to: 1; duration: 2000 } } Rectangle { width: 50; height: 50 color: "green" //bind our attributes to follow the path as progress changes x: motionPath.x y: motionPath.y rotation: motionPath.angle } }
プロパティの説明
angle : real [read-only]
このプロパティは、progress におけるパスの接線の角度を保持する。
角度は3時の位置を0度として時計回りに報告される。
path : Path
このプロパティは、補間するパスを保持する。
パスの定義の詳細については、Path のドキュメントを参照してください。
progress : real
このプロパティは、パスに沿った現在の進行状況を保持する。
PathInterpolator の典型的な使用法は、進捗を設定し(多くの場合、NumberAnimation を介して)、対応する x、y、angle の値を読み取る(多くの場合、これらの値へのバインディングを介して)ことです。
進捗の範囲は0.0から1.0です。
これらのプロパティは、progress におけるパスの位置を保持する。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.