Provides utility functions for matrix4x4 when used for 2D transforms. More...
| Import Statement: | import QtQuick |
| Since: | Qt 6.8 |
The PlanarTransform is a global object with utility functions.
It is not instantiable; to use it, call the members of the global PlanarTransform object directly. For example:
Item { transform: Matrix4x4 { matrix: PlanarTransform.fromAffineMatrix(1, 0, 0.36, 1, -36, 0) } }
Returns a matrix4x4 for an affine (non-projecting) 2D transform with the specified values.
This method and its argument order correspond to SVG's matrix() function and the six-argument QTransform constructor. The result is this 4x4 matrix:
| scaleX | shearX | 0 | translateX |
| shearY | scaleY | 0 | translateY |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
Returns a matrix4x4 for a 2D transform that rotates by angle degrees around the point (originX, originY).
originX and originY are optional and default to (0, 0).
Returns a matrix4x4 for a 2D transform that scales by scaleX horizontally and scaleY vertically, centered at the point (originX, originY).
originX and originY are optional and default to (0, 0).
|
matrix4x4 fromShear(float shearX, float shearY, float originX, float originY) |
Returns a matrix4x4 for a 2D transform that shears by shearX horizontally and shearY vertically, centered at the point (originX, originY).
originX and originY are optional and default to (0, 0).
Returns a matrix4x4 for a 2D transform that translates by translateX horizontally and translateY vertically.
|
matrix4x4 identity() |
Returns a matrix4x4 for the identity transform.
This is equivalent to Qt::matrix4x4().
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: