summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2010-01-14 14:18:45 (GMT)
committerYoann Lopes <yoann.lopes@nokia.com>2010-01-14 14:18:45 (GMT)
commit5baf1a9ba0388109685539384d6f4e674ad252d6 (patch)
treed3c082fe349ed15277506a0564900e42289ddcc0 /src
parentcfee61fd74d7fe73f0de13356fe683bc8ae91f92 (diff)
downloadQt-5baf1a9ba0388109685539384d6f4e674ad252d6.zip
Qt-5baf1a9ba0388109685539384d6f4e674ad252d6.tar.gz
Qt-5baf1a9ba0388109685539384d6f4e674ad252d6.tar.bz2
Fixes wrong stroke clipping with the raster engine.
The problem was that the clip rect was only updated when the QPen had changed. Task-number: QTBUG-7253 Reviewed-by: gunnar
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengineex.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 058f226..4f2fffa 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -417,13 +417,6 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
} 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 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
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();