src/gui/painting/qpaintengineex.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 14 c0432d11811c
--- a/src/gui/painting/qpaintengineex.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/gui/painting/qpaintengineex.cpp	Fri Feb 19 23:40:16 2010 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -417,13 +417,6 @@
         } else if (style == Qt::NoPen) {
             d->activeStroker = 0;
         } else {
-            // ### re-enable...
-            if (pen.isCosmetic()) {
-                d->dasher.setClipRect(d->exDeviceRect);
-            } else {
-                QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect));
-                d->dasher.setClipRect(clipRect);
-            }
             d->dasher.setDashPattern(pen.dashPattern());
             d->dasher.setDashOffset(pen.dashOffset());
             d->activeStroker = &d->dasher;
@@ -434,6 +427,15 @@
         return;
     }
 
+    if (pen.style() > Qt::SolidLine) {
+        if (pen.isCosmetic()) {
+            d->activeStroker->setClipRect(d->exDeviceRect);
+        } else {
+            QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect));
+            d->activeStroker->setClipRect(clipRect);
+        }
+    }
+
     const QPainterPath::ElementType *types = path.elements();
     const qreal *points = path.points();
     int pointCount = path.elementCount();
@@ -860,7 +862,7 @@
             for (int i=0; i<count; ++i) {
                 pts[++oset] = points[i].x();
                 pts[++oset] = points[i].y();
-                pts[++oset] = points[i].x() + 0.001;
+                pts[++oset] = points[i].x() + 1/63.;
                 pts[++oset] = points[i].y();
             }
             QVectorPath path(pts, count * 2, qpaintengineex_line_types_16, QVectorPath::LinesHint);
@@ -870,7 +872,7 @@
         }
     } else {
         for (int i=0; i<pointCount; ++i) {
-            qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + 0.001, points[i].y() };
+            qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + 1/63., points[i].y() };
             QVectorPath path(pts, 2, 0);
             stroke(path, pen);
         }
@@ -891,7 +893,7 @@
             for (int i=0; i<count; ++i) {
                 pts[++oset] = points[i].x();
                 pts[++oset] = points[i].y();
-                pts[++oset] = points[i].x() + 0.001;
+                pts[++oset] = points[i].x() + 1/63;
                 pts[++oset] = points[i].y();
             }
             QVectorPath path(pts, count * 2, qpaintengineex_line_types_16, QVectorPath::LinesHint);
@@ -901,7 +903,7 @@
         }
     } else {
         for (int i=0; i<pointCount; ++i) {
-            qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + 0.001, points[i].y() };
+            qreal pts[] = { points[i].x(), points[i].y(), points[i].x() +1/63., points[i].y() };
             QVectorPath path(pts, 2, 0);
             stroke(path, pen);
         }