diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-03-14 07:51:07 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-20 16:32:30 (GMT) |
commit | a2d573ac8e72315e60d4b17903d3035adffb8b18 (patch) | |
tree | bb8dc44ad3383993c8081230393284cd41144267 /src/gui/painting/qcosmeticstroker.cpp | |
parent | 0e1862cf317ae08ff80dc967491e69ea84599f13 (diff) | |
download | Qt-a2d573ac8e72315e60d4b17903d3035adffb8b18.zip Qt-a2d573ac8e72315e60d4b17903d3035adffb8b18.tar.gz Qt-a2d573ac8e72315e60d4b17903d3035adffb8b18.tar.bz2 |
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>
(cherry picked from commit c7191d3e214b9cdb17ec383b61f7e21e784f80d0)
Diffstat (limited to 'src/gui/painting/qcosmeticstroker.cpp')
-rw-r--r-- | src/gui/painting/qcosmeticstroker.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 192b021..9fddaed 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; } |