summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2019-04-10 12:35:39 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2019-04-25 06:07:00 +0000
commitd6c3fa6e0cdb55b9676f1a3f1365d835a039a6e2 (patch)
tree600a76cb9676894967b840da6f367a51eace7c6b /src/gui
parent8f8267f00bfa0d1716e38358ecc0fafff1d9df14 (diff)
Fix aliased painting with non-uniform scaling
The full stroker does not produce good results for aliased lines thinner than 1 pixel. Avoid it by making sure that such thin lines are painted by the cosmetic stroker, even when they have non-uniform transformation. Fixes: QTBUG-73866 Change-Id: I7b5f0fa555903246e0c3fd92cd435cc8c0b15a24 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 90b6d16551..ab22a71134 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -796,7 +796,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen)
s->flags.fast_pen = pen_style > Qt::NoPen
&& s->penData.blend
&& ((cosmetic && penWidth <= 1)
- || (!cosmetic && s->flags.tx_noshear && penWidth * s->txscale <= 1));
+ || (!cosmetic && (s->flags.tx_noshear || !s->flags.antialiased) && penWidth * s->txscale <= 1));
s->flags.non_complex_pen = qpen_capStyle(s->lastPen) <= Qt::SquareCap && s->flags.tx_noshear;