The scaling should not effect the width of a cosmetic pen
authorAndy Shaw <andy.shaw@digia.com>
Wed, 28 Mar 2012 07:56:55 +0000 (09:56 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Mar 2012 04:22:07 +0000 (06:22 +0200)
When the scaling effects the pen width so that it is less than 1 pixel
in width then it would use the QCosmeticStroker to draw, however this
should not be the case for cosmetic pens that are not less than 1 pixel
in width as the scaling does not change their width.

Task-number: QTBUG-25006
Change-Id: I142db0f3a7ee02aa87171495d5a7a7011100814e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/gui/painting/qpaintengine_raster.cpp

index b5e8bca..15f344b 100644 (file)
@@ -737,7 +737,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen)
     s->flags.fast_pen = pen_style > Qt::NoPen
             && s->penData.blend
             && ((pen.isCosmetic() && penWidth <= 1)
-                || (s->flags.tx_noshear && penWidth * s->txscale <= 1));
+                || (!pen.isCosmetic() && s->flags.tx_noshear && penWidth * s->txscale <= 1));
 
     s->flags.non_complex_pen = qpen_capStyle(s->lastPen) <= Qt::SquareCap && s->flags.tx_noshear;