diff options
-rw-r--r-- | src/gui/painting/qtransform.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index af27fd5..2383272 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -1317,12 +1317,16 @@ QRegion QTransform::map(const QRegion &r) const TransformationType t = 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(); } |