Add WindowQuad::bounds() as a convenience method to get a QRectF from it

This commit is contained in:
Arjen Hiemstra 2022-09-08 13:05:14 +02:00
parent 2ad497c8f9
commit 250d271b26

View file

@ -2930,6 +2930,7 @@ public:
double right() const;
double top() const;
double bottom() const;
QRectF bounds() const;
private:
friend class WindowQuadList;
@ -4091,6 +4092,11 @@ inline double WindowQuad::bottom() const
return qMax(verts[0].py, qMax(verts[1].py, qMax(verts[2].py, verts[3].py)));
}
inline QRectF WindowQuad::bounds() const
{
return QRectF(QPointF(left(), top()), QPointF(right(), bottom()));
}
/***************************************************************
Motion
***************************************************************/