diff options
author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2023-01-30 12:23:28 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-08 09:27:17 +0000 |
commit | d14185d33e919a35b9b93ec5bff6b3f630dcfdfe (patch) | |
tree | 66da473563ace16e493a78dc33ba92fcf25bfa13 /src | |
parent | e75229addcebfb21d5e0192438c5b7ceeaccede1 (diff) | |
download | qtbase-d14185d33e919a35b9b93ec5bff6b3f630dcfdfe.tar.gz |
Avoid multiple transformation of the clip path
The painter saves existing paint engine state in the stack and restore
back to the previous state after performing required paint operation.
The clip path stored as part of paint engine state is getting
translated more than once during save and restore operation. This
multiple transformation of the same clip path causes incorrect
translation within the plane.
To fix this issue, during restore, remove translation of clip path
with redirection matrix.
Fixes: QTBUG-109518
Change-Id: I1509bc7fa4965f2802bce62c1ed27cdb90da617a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 4e4d37f0472c58ff6c98e9852691b1ccda8beffb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 9dd3778756..e69f369dbe 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1618,7 +1618,6 @@ void QPainter::restore() // replay the list of clip states, for (const QPainterClipInfo &info : std::as_const(d->state->clipInfo)) { tmp->matrix = info.matrix; - tmp->matrix *= d->state->redirectionMatrix; tmp->clipOperation = info.operation; if (info.clipType == QPainterClipInfo::RectClip) { tmp->dirtyFlags = QPaintEngine::DirtyClipRegion | QPaintEngine::DirtyTransform; |