58 for (
int i = 0; i < tries; ++i) {
62 region = CreateRectRgn(left, top, right, bottom);
66 region = CreateEllipticRgn(left, top, right, bottom);
71 if (GetRegionData(region, 0, 0))
82 int numBytes = GetRegionData(rgn, 0, 0);
86 char *buf =
new char[numBytes];
90 RGNDATA *rd =
reinterpret_cast<RGNDATA*
>(buf);
91 if (GetRegionData(rgn, numBytes, rd) == 0) {
97 RECT *r =
reinterpret_cast<RECT*
>(rd->Buffer);
98 for (
uint i = 0; i < rd->rdh.nCount; ++i) {
100 rect.
setCoords(r->left, r->top, r->right - 1, r->bottom - 1);
120 HRGN dest = CreateRectRgn(0,0,0,0);
121 int result = CombineRgn(dest, winRegion, rgn, RGN_OR);
123 DeleteObject(winRegion);
133 DeleteObject(
d->
rgn);
134 d->
rgn = CreateRectRgn(0,0,0,0);
HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right, int bottom)
void qt_win_dispose_rgn(HRGN r)
#define QT_END_NAMESPACE
This macro expands to.
RegionType
Specifies the shape of the region to be created.
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
int height() const
Returns the height of the rectangle.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
static struct QRegionData shared_empty
QTextStream & right(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignRight) on stream and returns stream...
#define QT_BEGIN_NAMESPACE
This macro expands to.
void ensureHandle() const
The QRegion class specifies a clip region for a painter.
void setCoords(int x1, int y1, int x2, int y2)
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its botto...
const T & at(int i) const
Returns the item at index position i in the vector.
static void qt_add_rect(HRGN &winRegion, QRect r)
int top() const
Returns the y-coordinate of the rectangle's top edge.
int y() const
Returns the y-coordinate of the rectangle's top edge.
int x() const
Returns the x-coordinate of the rectangle's left edge.
QRegion qt_region_from_HRGN(HRGN rgn)
The QRect class defines a rectangle in the plane using integer precision.
QTextStream & left(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignLeft) on stream and returns stream...