[Qt-interest] QTransform SRT order

Malyushytsky, Alex alex at wai.com
Fri Jun 3 23:03:38 CEST 2011


>>doesn't matter what order the
QTransform::scale(), QTransform::rotate(), and QTransform::translate()
functions are called in, does it?

Yes it does.
It uses matrix operation and stores transformation matrix.
http://doc.qt.nokia.com/latest/qtransform.html#basic-matrix-operations

Think it this way if you move rectangle from the center of the origin along x axis and rotate it
45 degrees around origin will not be equal to rotating it first and then moving.

    Alex


-----Original Message-----
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Joshua Grauman
Sent: Friday, June 03, 2011 10:13 AM
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] QTransform SRT order

Hello all,

I am using QTransform to Scale, Rotate, and Translate an image. I was
wondering about the order of these operations. I'm assuming that
QTransform operates in the order of: Scale, then Rotate, then Translate.
Can anyone confirm this? It doesn't matter what order the
QTransform::scale(), QTransform::rotate(), and QTransform::translate()
functions are called in, does it? Thanks!

Josh
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”

“Please consider our environment before printing this email.”


More information about the Qt-interest-old mailing list