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, 각도에 해당하는 값을 읽어오는 것입니다(주로 해당 값들에 대한 바인딩을 통해).
진행도 범위는 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.