summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index ae7feb2..a41cab5 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -502,16 +502,17 @@ struct QGraphicsItemPrivate::TransformData
return transform * *postmultiplyTransform;
}
- QTransform x(transform);
+ QMatrix4x4 x(transform);
for (int i = 0; i < graphicsTransforms.size(); ++i)
graphicsTransforms.at(i)->applyTo(&x);
x.translate(xOrigin, yOrigin);
- x.rotate(rotation, Qt::ZAxis);
- x.scale(scale, scale);
+ x.rotate(rotation, 0, 0, 1);
+ x.scale(scale);
x.translate(-xOrigin, -yOrigin);
+ QTransform t = x.toTransform(); // project the 3D matrix back to 2D.
if (postmultiplyTransform)
- x *= *postmultiplyTransform;
- return x;
+ t *= *postmultiplyTransform;
+ return t;
}
};