diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-10 12:31:20 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-10 14:15:41 (GMT) |
commit | 32f32ee3e752a6cc03505ddaa48d2849eaedc2a6 (patch) | |
tree | ab6529edcfd0cc41a4d998504e768129c2e19dfd /src/gui/painting/qpainter_p.h | |
parent | f01efd0b49be074d9bc5a963b6d353b9eddf365a (diff) | |
download | Qt-32f32ee3e752a6cc03505ddaa48d2849eaedc2a6.zip Qt-32f32ee3e752a6cc03505ddaa48d2849eaedc2a6.tar.gz Qt-32f32ee3e752a6cc03505ddaa48d2849eaedc2a6.tar.bz2 |
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h index 6c8821a..8d4e6c5 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; |