20 std::swap(*
this, other);
26 bool contains(
const QPoint &p)
const;
27 bool contains(
const QRect &r)
const;
33 inline bool contains(
const QRegion &r)
const {
34 return contains(r.extents);
40 inline bool within(
const QRect &r1)
const {
41 const QRect &r2 = extents;
42 return r2.left() >= r1.left() && r2.right() <= r1.right()
43 && r2.top() >= r1.top() && r2.bottom() <= r1.bottom();
46 inline void updateInnerRect(
const QRect &rect) {
47 const int area = rect.width() * rect.height();
48 if (area > innerArea) {
54 inline void vectorize() {
62 inline void append(
const QRect *r);
64 void prepend(
const QRect *r);
66 inline bool canAppend(
const QRect *r)
const;
67 inline bool canAppend(
const QRegion *r)
const;
68 inline bool canPrepend(
const QRect *r)
const;
69 inline bool canPrepend(
const QRegion *r)
const;
71 inline bool mergeFromRight(
QRect *left,
const QRect *right);
72 inline bool mergeFromLeft(
QRect *left,
const QRect *right);
73 inline bool mergeFromBelow(
QRect *top,
const QRect *bottom,
74 const QRect *nextToTop,
75 const QRect *nextToBottom);
76 inline bool mergeFromAbove(
QRect *bottom,
const QRect *top,
77 const QRect *nextToBottom,
78 const QRect *nextToTop);
82 void translate(
int dx,
int dy);
83 inline void translate(
const QPoint &p) { translate(p.x(), p.y()); }
84 QRegion translated(
int dx,
int dy)
const;
85 inline QRegion translated(
const QPoint &p)
const {
return translated(p.x(), p.y()); }
94 bool intersects(
const QRegion &r)
const;
95 bool intersects(
const QRect &r)
const;
97 QRect boundingRect()
const;
98 std::vector<QRect> Rects()
const;
99 void setRects(
const QRect *rect,
int num);
100 int rectCount()
const;
117 bool operator==(
const QRegion &r)
const;
118 inline bool operator!=(
const QRegion &r)
const {
return !(operator==(r)); }
123 friend bool qt_region_strictContains(
const QRegion ®ion,
const QRect &rect);
127 std::vector<QRect> rects;
Definition: Rectangle.h:7
different physics engine has different winding order.
Definition: EventBinding.h:32
when concerting QRect with QRectF and RECT, we ensure that their left, top and width, height are the same.
Definition: ParaRect.h:16
Definition: ParaPoint.h:5
Definition: ParaRegion.h:7