From: Robin Burchell Date: Wed, 11 Apr 2012 08:26:50 +0000 (+0200) Subject: Move QRectVectorPath into the .cpp of the only file actually using it. X-Git-Tag: 071012110112~1235^2^2~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=517240096b7ed5943040c4aea622e562f1e920ac;p=profile%2Fivi%2Fqtbase.git Move QRectVectorPath into the .cpp of the only file actually using it. Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170 Reviewed-by: Samuel Rødal --- diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 15f344b..e73fb5e 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -84,6 +84,54 @@ QT_BEGIN_NAMESPACE +class QRectVectorPath : public QVectorPath { +public: + inline void set(const QRect &r) { + qreal left = r.x(); + qreal right = r.x() + r.width(); + qreal top = r.y(); + qreal bottom = r.y() + r.height(); + pts[0] = left; + pts[1] = top; + pts[2] = right; + pts[3] = top; + pts[4] = right; + pts[5] = bottom; + pts[6] = left; + pts[7] = bottom; + } + + inline void set(const QRectF &r) { + qreal left = r.x(); + qreal right = r.x() + r.width(); + qreal top = r.y(); + qreal bottom = r.y() + r.height(); + pts[0] = left; + pts[1] = top; + pts[2] = right; + pts[3] = top; + pts[4] = right; + pts[5] = bottom; + pts[6] = left; + pts[7] = bottom; + } + inline QRectVectorPath(const QRect &r) + : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose) + { + set(r); + } + inline QRectVectorPath(const QRectF &r) + : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose) + { + set(r); + } + inline QRectVectorPath() + : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose) + { } + + qreal pts[8]; +}; + Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp #define qreal_to_fixed_26_6(f) (int(f * 64)) diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h index bc944b2..8a65e6c 100644 --- a/src/gui/painting/qpaintengineex_p.h +++ b/src/gui/painting/qpaintengineex_p.h @@ -84,54 +84,6 @@ struct QIntRect { } }; -class QRectVectorPath : public QVectorPath { -public: - inline void set(const QRect &r) { - qreal left = r.x(); - qreal right = r.x() + r.width(); - qreal top = r.y(); - qreal bottom = r.y() + r.height(); - pts[0] = left; - pts[1] = top; - pts[2] = right; - pts[3] = top; - pts[4] = right; - pts[5] = bottom; - pts[6] = left; - pts[7] = bottom; - } - - inline void set(const QRectF &r) { - qreal left = r.x(); - qreal right = r.x() + r.width(); - qreal top = r.y(); - qreal bottom = r.y() + r.height(); - pts[0] = left; - pts[1] = top; - pts[2] = right; - pts[3] = top; - pts[4] = right; - pts[5] = bottom; - pts[6] = left; - pts[7] = bottom; - } - inline QRectVectorPath(const QRect &r) - : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose) - { - set(r); - } - inline QRectVectorPath(const QRectF &r) - : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose) - { - set(r); - } - inline QRectVectorPath() - : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose) - { } - - qreal pts[8]; -}; - #ifndef QT_NO_DEBUG_STREAM QDebug Q_GUI_EXPORT &operator<<(QDebug &, const QVectorPath &path); #endif