Matrix4x4 QML Type
Ofrece una forma de aplicar una matriz de transformación 4x4 a un objeto ` Item`. Más información...
| Import Statement: | import QtQuick |
Propiedades
- matrix : matrix4x4
Descripción detallada
El tipo Matrix4x4 permite aplicar una transformación a un objeto de tipo « Item » mediante una matriz de 4x4.
Permite combinar rotación, escalado, traslación y deformación utilizando una única transformación representada en una matriz 4x4.
El siguiente ejemplo gira un rectángulo 45 grados (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)
}
}Documentación de propiedades
matrix : matrix4x4
Matriz de 4x4 que se utilizará en la transformación de un 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.