PlanarTransform QML Type
Proporciona funciones de utilidad para matrices de 4x4 cuando se utilizan para transformaciones en 2D. Más información...
| Import Statement: | import QtQuick |
| Since: | Qt 6.8 |
Métodos
- matrix4x4 fromAffineMatrix(real scaleX, real shearY, real shearX, real scaleY, real translateX, real translateY)
- matrix4x4 fromRotate(real angle, real originX, real originY)
- matrix4x4 fromScale(real scaleX, real scaleY, real originX, real originY)
- matrix4x4 fromShear(float shearX, float shearY, float originX, float originY)
- matrix4x4 fromTranslate(real translateX, real translateY)
- matrix4x4 identity()
Descripción detallada
PlanarTransform es un objeto global con funciones de utilidad.
No se puede instanciar; para utilizarlo, hay que llamar directamente a los miembros del objeto global ` PlanarTransform `. Por ejemplo:
Documentación de métodos
matrix4x4 fromAffineMatrix(real scaleX, real shearY, real shearX, real scaleY, real translateX, real translateY)
Devuelve una matriz 4x4 para una transformación afín (no proyectiva) en 2D con los valores especificados.
Este método y el orden de sus argumentos se corresponden con la función ` matrix() ` de SVG y con el constructor ` QTransform ` de seis argumentos. El resultado es esta matriz de 4x4:
| scaleX | shearX | 0 | translateX |
| shearY | scaleY | 0 | translateY |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
matrix4x4 fromRotate(real angle, real originX, real originY)
Devuelve una matriz de 4x4 para una transformación 2D que gira un ángulo de angle grados alrededor del punto (originX, originY).
originX y originY son opcionales y su valor por defecto es (0, 0).
matrix4x4 fromScale(real scaleX, real scaleY, real originX, real originY)
Devuelve una matriz de 4x4 para una transformación 2D que escala en la dirección horizontal mediante scaleX y en la vertical mediante scaleY, centrada en el punto (originX, originY).
originX y originY son opcionales y su valor por defecto es (0, 0).
matrix4x4 fromShear(float shearX, float shearY, float originX, float originY)
Devuelve una matriz de 4x4 para una transformación 2D que aplica un sesgo de shearX en horizontal y de shearY en vertical, centrada en el punto (originX, originY).
originX y originY son opcionales y su valor por defecto es (0, 0).
matrix4x4 fromTranslate(real translateX, real translateY)
Devuelve una matriz de 4×4 para una transformación 2D que realiza una traslación de translateX en horizontal y de translateY en vertical.
matrix4x4 identity()
Devuelve una matriz de 4x4 correspondiente a la transformación identidad.
Esto equivale a Qt::matrix4x4().
© 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.