QTransform rotate and scale order
Hi,
I have an application that applies transformations to QGraphicsPolygonItems.
The working code is:
Code:
QTransform trans;
trans = trans.rotate(formerRotation);
trans = trans.scale(currentXFactor,currentYFactor);
setTransform(trans,false); //Replaces the tranformation
However if I first scale and then rotate the result is completely different as rotating and then scaling.
Any idea why?
Re: QTransform rotate and scale order
Because the transformations are applied one at a time, in the order given, and the order in which transformations are applied makes a difference.
Re: QTransform rotate and scale order