summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpainterpath.h')
-rw-r--r--src/gui/painting/qpainterpath.h67
1 files changed, 5 insertions, 62 deletions
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 40456bc163..7bb52f4125 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -165,7 +165,7 @@ public:
Qt::FillRule fillRule() const;
void setFillRule(Qt::FillRule fillRule);
- inline bool isEmpty() const;
+ bool isEmpty() const;
QPainterPath toReversed() const;
QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
@@ -175,9 +175,9 @@ public:
QList<QPolygonF> toFillPolygons(const QTransform &matrix) const;
QPolygonF toFillPolygon(const QTransform &matrix) const;
- inline int elementCount() const;
- inline const QPainterPath::Element &elementAt(int i) const;
- inline void setElementPositionAt(int i, qreal x, qreal y);
+ int elementCount() const;
+ QPainterPath::Element elementAt(int i) const;
+ void setElementPositionAt(int i, qreal x, qreal y);
qreal length() const;
qreal percentAtLength(qreal t) const;
@@ -211,7 +211,7 @@ private:
inline void ensureData() { if (!d_ptr) ensureData_helper(); }
void ensureData_helper();
- inline void detach();
+ void detach();
void detach_helper();
void setDirty(bool);
void computeBoundingRect() const;
@@ -233,29 +233,6 @@ private:
#endif
};
-class QPainterPathPrivate
-{
-public:
- friend class QPainterPath;
- friend class QPainterPathData;
- friend class QPainterPathStroker;
- friend class QPainterPathStrokerPrivate;
- friend class QMatrix;
- friend class QTransform;
- friend class QVectorPath;
- friend struct QPainterPathPrivateDeleter;
-#ifndef QT_NO_DATASTREAM
- friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPainterPath &);
- friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPainterPath &);
-#endif
-
- QPainterPathPrivate() : ref(1) {}
-
-private:
- QAtomicInt ref;
- QVector<QPainterPath::Element> elements;
-};
-
Q_DECLARE_TYPEINFO(QPainterPath::Element, Q_PRIMITIVE_TYPE);
#ifndef QT_NO_DATASTREAM
@@ -391,40 +368,6 @@ inline void QPainterPath::translate(const QPointF &offset)
inline QPainterPath QPainterPath::translated(const QPointF &offset) const
{ return translated(offset.x(), offset.y()); }
-inline bool QPainterPath::isEmpty() const
-{
- return !d_ptr || (d_ptr->elements.size() == 1 && d_ptr->elements.first().type == MoveToElement);
-}
-
-inline int QPainterPath::elementCount() const
-{
- return d_ptr ? d_ptr->elements.size() : 0;
-}
-
-inline const QPainterPath::Element &QPainterPath::elementAt(int i) const
-{
- Q_ASSERT(d_ptr);
- Q_ASSERT(i >= 0 && i < elementCount());
- return d_ptr->elements.at(i);
-}
-
-inline void QPainterPath::setElementPositionAt(int i, qreal x, qreal y)
-{
- Q_ASSERT(d_ptr);
- Q_ASSERT(i >= 0 && i < elementCount());
- detach();
- QPainterPath::Element &e = d_ptr->elements[i];
- e.x = x;
- e.y = y;
-}
-
-
-inline void QPainterPath::detach()
-{
- if (d_ptr->ref.load() != 1)
- detach_helper();
- setDirty(true);
-}
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug, const QPainterPath &);