summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtransform.cpp
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-29 17:51:02 (GMT)
committerBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-29 17:51:02 (GMT)
commitd355e069ca1952504ef8cc6fb44350b53314d5d5 (patch)
treef2372d54b1bf988312ff4ab0b91b7d3e74629367 /src/gui/painting/qtransform.cpp
parentd20bf7c8b368cb56df1a965793edbd23ff0c3213 (diff)
parent073b7ce298b0e079f310ec22dee44a9fc0af9ee6 (diff)
downloadQt-d355e069ca1952504ef8cc6fb44350b53314d5d5.zip
Qt-d355e069ca1952504ef8cc6fb44350b53314d5d5.tar.gz
Qt-d355e069ca1952504ef8cc6fb44350b53314d5d5.tar.bz2
Merge commit 'origin/4.5'
Diffstat (limited to 'src/gui/painting/qtransform.cpp')
-rw-r--r--src/gui/painting/qtransform.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index d06107f..4a33b92 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1387,12 +1387,16 @@ QRegion QTransform::map(const QRegion &r) const
TransformationType t = inline_type();
if (t == TxNone)
return r;
+
if (t == TxTranslate) {
QRegion copy(r);
copy.translate(qRound(affine._dx), qRound(affine._dy));
return copy;
}
+ if (t == TxScale && r.numRects() == 1)
+ return QRegion(mapRect(r.boundingRect()));
+
QPainterPath p = map(qt_regionToPath(r));
return p.toFillPolygon(QTransform()).toPolygon();
}