diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-03-05 09:36:49 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-03-06 21:09:48 +0100 |
commit | 50d2acdc93b4de2ba56eb67787e2bdcb21dd4bea (patch) | |
tree | 112fe07180c2a24bec970510c7b2432d57319757 /src/gui/painting | |
parent | ccee938b5193ff90a6fecc1f4635b856a24718bd (diff) |
Add default arguments to QPainterPath methods using transform
Fixes: QTBUG-82602
Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpainterpath.h | 15 | ||||
-rw-r--r-- | src/gui/painting/qrasterizer.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qtransform.h | 5 |
4 files changed, 14 insertions, 10 deletions
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 26b92dc6fa..8d4bdf2e19 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -42,6 +42,7 @@ #include <QtGui/qtguiglobal.h> #include <QtGui/qmatrix.h> +#include <QtGui/qtransform.h> #include <QtCore/qglobal.h> #include <QtCore/qrect.h> #include <QtCore/qline.h> @@ -178,15 +179,15 @@ public: #if QT_DEPRECATED_SINCE(5, 15) QT_DEPRECATED_X("Use toSubpathPolygons(const QTransform &)") - QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const; + QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix) const; QT_DEPRECATED_X("Use toFillPolygons(const QTransform &") - QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const; + QList<QPolygonF> toFillPolygons(const QMatrix &matrix) const; QT_DEPRECATED_X("Use toFillPolygon(const QTransform &)") - QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const; + QPolygonF toFillPolygon(const QMatrix &matrix) const; #endif // QT_DEPRECATED_SINCE(5, 15) - QList<QPolygonF> toSubpathPolygons(const QTransform &matrix) const; - QList<QPolygonF> toFillPolygons(const QTransform &matrix) const; - QPolygonF toFillPolygon(const QTransform &matrix) const; + QList<QPolygonF> toSubpathPolygons(const QTransform &matrix = QTransform()) const; + QList<QPolygonF> toFillPolygons(const QTransform &matrix = QTransform()) const; + QPolygonF toFillPolygon(const QTransform &matrix = QTransform()) const; int elementCount() const; QPainterPath::Element elementAt(int i) const; @@ -362,6 +363,8 @@ inline void QPainterPath::translate(const QPointF &offset) inline QPainterPath QPainterPath::translated(const QPointF &offset) const { return translated(offset.x(), offset.y()); } +inline QPainterPath operator *(const QPainterPath &p, const QTransform &m) +{ return m.map(p); } #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QPainterPath &); diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index cd31d75f83..f3c193d799 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -46,6 +46,8 @@ #include <private/qdatabuffer_p.h> #include <private/qdrawhelper_p.h> +#include <QtGui/qpainterpath.h> + #include <algorithm> QT_BEGIN_NAMESPACE diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 91214f27ca..141b195a42 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -43,6 +43,8 @@ #include "private/qfontengine_p.h" #include "private/qnumeric_p.h" +#include <QtGui/qpainterpath.h> + QT_BEGIN_NAMESPACE // #define CACHE_DEBUG diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index 485caa5140..41cbfc35f2 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -41,7 +41,6 @@ #include <QtGui/qtguiglobal.h> #include <QtGui/qmatrix.h> -#include <QtGui/qpainterpath.h> #include <QtGui/qpolygon.h> #include <QtGui/qregion.h> #include <QtGui/qwindowdefs.h> @@ -51,8 +50,8 @@ QT_BEGIN_NAMESPACE - class QVariant; +class QPainterPath; class Q_GUI_EXPORT QTransform { @@ -408,8 +407,6 @@ inline QPolygonF operator *(const QPolygonF &a, const QTransform &m) { return m.map(a); } inline QRegion operator *(const QRegion &r, const QTransform &m) { return m.map(r); } -inline QPainterPath operator *(const QPainterPath &p, const QTransform &m) -{ return m.map(p); } inline QTransform operator *(const QTransform &a, qreal n) { QTransform t(a); t *= n; return t; } |