summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-06-02 19:31:31 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-11 07:19:22 (GMT)
commitf88167c39259967912540cf50d3f9df9524da4b3 (patch)
tree9e46303abad576411b03734e75e17d1d4c09126c /src/declarative/fx
parente83bed831c80657221176b9c0e24962d9c9e7ca2 (diff)
downloadQt-f88167c39259967912540cf50d3f9df9524da4b3.zip
Qt-f88167c39259967912540cf50d3f9df9524da4b3.tar.gz
Qt-f88167c39259967912540cf50d3f9df9524da4b3.tar.bz2
make the setRotation code a little more efficient
This doesn't give us much. The real fix here is to add support for rotation and transformationOrigin to QGraphicsItem.
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 09ec748..648b0fb 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -1490,9 +1490,8 @@ void QFxItem::setRotation(qreal rotation)
trans.rotate(d->_rotation, 0, 0, 1);
trans.translate(-to.x(), -to.y());
#else
- QTransform trans;
- QPointF to = transformOriginPoint();
- trans.translate(to.x(), to.y());
+ QPointF to = d->transformOrigin();
+ QTransform trans = QTransform::fromTranslate(to.x(), to.y());
trans.rotate(d->_rotation);
trans.translate(-to.x(), -to.y());
#endif