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>
This commit is contained in:
parent
94057bd800
commit
4e4d37f047
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user