From f88167c39259967912540cf50d3f9df9524da4b3 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 2 Jun 2009 21:31:31 +0200 Subject: 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. --- src/declarative/fx/qfxitem.cpp | 5 ++--- 1 file 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 -- cgit v0.12