summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2013-03-14 08:51:07 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-14 12:37:20 +0100
commitc7191d3e214b9cdb17ec383b61f7e21e784f80d0 (patch)
tree86c39c798d278f14b122504f4024e27074c724a2 /src
parent97be79012cd39d1d0e7748d5c500d86c3becc258 (diff)
Fixed artifacts when drawing same line with different clips.
Expanding on the change fixing QTBUG-24762 with the realization that any line needs to be drawn in a consistent way regardless of system or painter clip, not just dashed lines. Task-number: QTBUG-25036 Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 1de955bc13..3659c56ac7 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -290,14 +290,14 @@ void QCosmeticStroker::setup()
ppl = buffer->bytesPerLine()>>2;
}
- // dashes are sensitive to clips, so we need to clip consistently when painting to the same device
- QRect clipRect = strokeSelection & Dashed ? deviceRect : clip;
+ // line drawing produces different results with different clips, so
+ // we need to clip consistently when painting to the same device
// setup FP clip bounds
- xmin = clipRect.left() - 1;
- xmax = clipRect.right() + 2;
- ymin = clipRect.top() - 1;
- ymax = clipRect.bottom() + 2;
+ xmin = deviceRect.left() - 1;
+ xmax = deviceRect.right() + 2;
+ ymin = deviceRect.top() - 1;
+ ymax = deviceRect.bottom() + 2;
lastPixel.x = -1;
}