summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengineex.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-07-23 12:20:14 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-07-23 13:10:53 (GMT)
commit9fd510721a140c46ce371b0c7bbc6917e3709c1d (patch)
treecff878715b8321d4711025597aa84570aca9be43 /src/gui/painting/qpaintengineex.cpp
parentec679d7d49012996bc43a7f4152616af15d97dfd (diff)
downloadQt-9fd510721a140c46ce371b0c7bbc6917e3709c1d.zip
Qt-9fd510721a140c46ce371b0c7bbc6917e3709c1d.tar.gz
Qt-9fd510721a140c46ce371b0c7bbc6917e3709c1d.tar.bz2
Implement clipping in the QPaintEngineEx::stroke() function.
This is a huge impact on performance whenever this path is taken. Reviewed-By: Tom Cooksey
Diffstat (limited to 'src/gui/painting/qpaintengineex.cpp')
-rw-r--r--src/gui/painting/qpaintengineex.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index df7dc3e..95355f3 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -296,12 +296,12 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
d->activeStroker = 0;
} else {
// ### re-enable...
-// if (pen.isCosmetic()) {
-// d->dashStroker->setClipRect(d->deviceRect);
-// } else {
-// QRectF clipRect = s->matrix.inverted().mapRect(QRectF(d->deviceRect));
-// d->dashStroker->setClipRect(clipRect);
-// }
+ 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;