From c7191d3e214b9cdb17ec383b61f7e21e784f80d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Mar 2013 08:51:07 +0100 Subject: 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 --- src/gui/painting/qcosmeticstroker.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui/painting') 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; } -- cgit v1.2.3