diff options
author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2023-01-30 12:23:28 +0100 |
---|---|---|
committer | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2023-02-07 13:33:02 +0100 |
commit | 4e4d37f0472c58ff6c98e9852691b1ccda8beffb (patch) | |
tree | d4a77f787a7af5da875126ae34bc79ff68581dc8 /src/gui/painting | |
parent | 94057bd800577b6cc770d93a235859e280ed1c63 (diff) |
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
Pick-to: 6.5 6.4 6.2
Change-Id: I1509bc7fa4965f2802bce62c1ed27cdb90da617a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting')
-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; |