From 517240096b7ed5943040c4aea622e562f1e920ac Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 11 Apr 2012 10:26:50 +0200 Subject: [PATCH] Move QRectVectorPath into the .cpp of the only file actually using it. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170 Reviewed-by: Samuel Rødal --- src/gui/painting/qpaintengine_raster.cpp | 48 ++++++++++++++++++++++++++++++++ src/gui/painting/qpaintengineex_p.h | 48 -------------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) 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 -- 2.7.4