summaryrefslogtreecommitdiff
path: root/src/gui/painting/qpainter_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-10 14:31:20 +0200
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-10 16:15:41 +0200
commit32f32ee3e752a6cc03505ddaa48d2849eaedc2a6 (patch)
treeab6529edcfd0cc41a4d998504e768129c2e19dfd /src/gui/painting/qpainter_p.h
parentf01efd0b49be074d9bc5a963b6d353b9eddf365a (diff)
downloadqt4-tools-32f32ee3e752a6cc03505ddaa48d2849eaedc2a6.tar.gz
QPainter::worldTransform() does not return identity matrix.
QPainter::worldTransform() does not return identity matrix when created on a redirected widget. It should always be identity by default, and should only change as a result of QPainter::setWorldTransform. The reason it didn't return identity for redirected widgets, was that we translated the shared painter's world matrix directly. Since we cannot modify the world matrix directly, we have to store the shared painter's current world transform in a separate matrix (redirectedMatrix), reset the world transform to identity, and later combine the redirectedMatrix with world transforms set on the painter. Note that redirection_offset was in negative coordinates before, and that redirectionMatrix now is in positive coordinates, hence opposite signs around. Auto-test included. Reviewed-by: lars Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpainter_p.h')
-rw-r--r--src/gui/painting/qpainter_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 6c8821addf..8d4e6c5df8 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -158,7 +158,7 @@ public:
QList<QPainterClipInfo> clipInfo; // ### Make me smaller and faster to copy around...
QTransform worldMatrix; // World transformation matrix, not window and viewport
QTransform matrix; // Complete transformation matrix,
- QPoint redirection_offset;
+ QTransform redirectionMatrix;
int wx, wy, ww, wh; // window rectangle
int vx, vy, vw, vh; // viewport rectangle
qreal opacity;