Translation is the simplest transformation. Setting dx and dy will move the coordinate system dx units along the X axis and dy units along the Y axis. Scaling can be done by setting m11 and m22 . Shearing is controlled by m12 and m21 . Setting these elements to values different from zero will twist the coordinate system.
Rotation is achieved by carefully setting both the shearing factors and the scaling factors.
The QWMatrix has a function that sets rotation directly. If rotation or shearing has been specified, then the bounding rectangle will be returned. Returns a reference to the matrix. Scales the coordinate system unit by sx horizontally and sy vertically. Returns a reference to the matrix.