Matrix4x4 QML Type
Bietet eine Möglichkeit, eine 4×4-Transformationsmatrix auf eine „ Item “ anzuwenden. Mehr...
| Import Statement: | import QtQuick |
Eigenschaften
- matrix : matrix4x4
Ausführliche Beschreibung
Der Typ „Matrix4x4“ bietet die Möglichkeit, mithilfe einer 4x4-Matrix eine Transformation auf ein „ Item “ anzuwenden.
Er ermöglicht eine Kombination aus Rotation, Skalierung, Translation und Scherung unter Verwendung einer einzigen, in einer 4x4-Matrix bereitgestellten Transformation.
Das folgende Beispiel dreht ein Rechteck um 45 Grad (PI/4):
Rectangle {
width: 100
height: 100
color: "red"
transform: Matrix4x4 {
property real a: Math.PI / 4
matrix: Qt.matrix4x4(Math.cos(a), -Math.sin(a), 0, 0,
Math.sin(a), Math.cos(a), 0, 0,
0, 0, 1, 0,
0, 0, 0, 1)
}
}Dokumentation der Eigenschaften
matrix : matrix4x4
4x4-Matrix, die bei der Transformation eines Item
© 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.