Move QRectVectorPath into the .cpp of the only file actually using it.
Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
f97db2555e
commit
517240096b
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user