diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-04-22 12:49:24 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-04-22 14:03:59 (GMT) |
commit | cf9db492ac60568bd159c3749dfa11e2347b9927 (patch) | |
tree | f52c740d74180974fbb3a040d375b9d4bc9cc887 /tests/auto/qtransform/tst_qtransform.cpp | |
parent | 3696886a327fc4894518c5570b02d5238dcede8a (diff) | |
download | Qt-cf9db492ac60568bd159c3749dfa11e2347b9927.zip Qt-cf9db492ac60568bd159c3749dfa11e2347b9927.tar.gz Qt-cf9db492ac60568bd159c3749dfa11e2347b9927.tar.bz2 |
Prevent QTransform::type() from returning TxScale instead of TxProject.
We have code that assumes that m33 = 1 if the type is TxScale. Instead
of changing all that code it's better to just return TxProject as type
when m33 is different from 1.
Reviewed-by: Simon Hausmann
Diffstat (limited to 'tests/auto/qtransform/tst_qtransform.cpp')
-rw-r--r-- | tests/auto/qtransform/tst_qtransform.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qtransform/tst_qtransform.cpp b/tests/auto/qtransform/tst_qtransform.cpp index 8516ddb..74c405e 100644 --- a/tests/auto/qtransform/tst_qtransform.cpp +++ b/tests/auto/qtransform/tst_qtransform.cpp @@ -593,6 +593,16 @@ void tst_QTransform::types() m3.translate(5.0f, 5.0f); QCOMPARE(m3.type(), QTransform::TxScale); QCOMPARE(m3.inverted().type(), QTransform::TxScale); + + m3.setMatrix(1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 2.0f); + QCOMPARE(m3.type(), QTransform::TxProject); + + m3.setMatrix(0.0f, 2.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 2.0f); + QCOMPARE(m3.type(), QTransform::TxProject); } |