![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include "qregion.h"
#include "qpainterpath.h"
#include "qpolygon.h"
#include "qbuffer.h"
#include "qdatastream.h"
#include "qvariant.h"
#include "qvarlengtharray.h"
#include "qimage.h"
#include "qbitmap.h"
#include "qtransform.h"
#include <memory>
#include <private/qdebug_p.h>
#include <limits.h>
Go to the source code of this file.
Classes | |
struct | QRegionPrivate |
struct | _POINTBLOCK |
struct | BRESINFO |
struct | _EdgeTableEntry |
struct | _ScanLineList |
struct | EdgeTable |
struct | _ScanLineListBlock |
struct | QRegionSpan |
Macros | |
#define | QRGN_SETRECT 1 |
#define | QRGN_SETELLIPSE 2 |
#define | QRGN_SETPTARRAY_ALT 3 |
#define | QRGN_SETPTARRAY_WIND 4 |
#define | QRGN_TRANSLATE 5 |
#define | QRGN_OR 6 |
#define | QRGN_AND 7 |
#define | QRGN_SUB 8 |
#define | QRGN_XOR 9 |
#define | QRGN_RECTS 10 |
#define | RectangleOut 0 |
#define | RectangleIn 1 |
#define | RectanglePart 2 |
#define | EvenOddRule 0 |
#define | WindingRule 1 |
#define | _XREGION_H |
#define | EXTENTCHECK(r1, r2) |
#define | EXTENTS(r, idRect) |
#define | MEMCHECK(dest, rect, firstrect) |
#define | NUMPTSTOBUFFER 200 |
#define | MERGERECT(r) |
#define | BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) |
#define | BRESINCRPGON(d, minval, m, m1, incr1, incr2) |
#define | BRESINITPGONSTRUCT(dmaj, min1, min2, bres) |
#define | BRESINCRPGONSTRUCT(bres) |
#define | CLOCKWISE 1 |
#define | COUNTERCLOCKWISE -1 |
#define | SLLSPERBLOCK 25 |
#define | EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) |
#define | EVALUATEEDGEEVENODD(pAET, pPrevAET, y) |
#define | LARGE_COORDINATE INT_MAX |
#define | SMALL_COORDINATE INT_MIN |
#define | AddSpan |
Typedefs | |
typedef void(* | OverlapFunc) (QRegionPrivate &dest, const QRect *r1, const QRect *r1End, const QRect *r2, const QRect *r2End, int y1, int y2) |
typedef void(* | NonOverlapFunc) (QRegionPrivate &dest, const QRect *r, const QRect *rEnd, int y1, int y2) |
typedef struct _POINTBLOCK | POINTBLOCK |
typedef struct _EdgeTableEntry | EdgeTableEntry |
typedef struct _ScanLineList | ScanLineList |
typedef struct _ScanLineListBlock | ScanLineListBlock |
Functions | |
QDebug | operator<< (QDebug s, const QRegion &r) |
bool | rect_intersects (const QRect &r1, const QRect &r2) |
Q_DECLARE_TYPEINFO (Segment, Q_PRIMITIVE_TYPE) | |
Q_GUI_EXPORT QPainterPath | qt_regionToPath (const QRegion ®ion) |
static bool | isEmptyHelper (const QRegionPrivate *preg) |
static bool | canMergeFromRight (const QRect *left, const QRect *right) |
static bool | canMergeFromLeft (const QRect *right, const QRect *left) |
static bool | canMergeFromBelow (const QRect *top, const QRect *bottom, const QRect *nextToTop, const QRect *nextToBottom) |
static QRect | qt_rect_intersect_normalized (const QRect &r1, const QRect &r2) |
static bool | EqualRegion (const QRegionPrivate *r1, const QRegionPrivate *r2) |
static void | UnionRegion (const QRegionPrivate *reg1, const QRegionPrivate *reg2, QRegionPrivate &dest) |
static void | miRegionOp (QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2, OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func, NonOverlapFunc nonOverlap2Func) |
static void | UnionRectWithRegion (const QRect *rect, const QRegionPrivate *source, QRegionPrivate &dest) |
static void | miSetExtents (QRegionPrivate &dest) |
static void | OffsetRegion (QRegionPrivate ®ion, int x, int y) |
static void | miIntersectO (QRegionPrivate &dest, const QRect *r1, const QRect *r1End, const QRect *r2, const QRect *r2End, int y1, int y2) |
static int | miCoalesce (QRegionPrivate &dest, int prevStart, int curStart) |
static void | miUnionNonO (QRegionPrivate &dest, const QRect *r, const QRect *rEnd, int y1, int y2) |
static void | miUnionO (QRegionPrivate &dest, const QRect *r1, const QRect *r1End, const QRect *r2, const QRect *r2End, int y1, int y2) |
static void | miSubtractNonO1 (QRegionPrivate &dest, const QRect *r, const QRect *rEnd, int y1, int y2) |
static void | miSubtractO (QRegionPrivate &dest, const QRect *r1, const QRect *r1End, const QRect *r2, const QRect *r2End, int y1, int y2) |
static void | SubtractRegion (QRegionPrivate *regM, QRegionPrivate *regS, QRegionPrivate &dest) |
static void | XorRegion (QRegionPrivate *sra, QRegionPrivate *srb, QRegionPrivate &dest) |
static bool | PointInRegion (QRegionPrivate *pRegion, int x, int y) |
static bool | RectInRegion (QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight) |
static void | InsertEdgeInET (EdgeTable *ET, EdgeTableEntry *ETE, int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) |
static void | CreateETandAET (int count, const QPoint *pts, EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) |
static void | loadAET (EdgeTableEntry *AET, EdgeTableEntry *ETEs) |
static void | computeWAET (EdgeTableEntry *AET) |
static int | InsertionSort (EdgeTableEntry *AET) |
static void | FreeStorage (ScanLineListBlock *pSLLBlock) |
Q_DECLARE_TYPEINFO (QRegionSpan, Q_PRIMITIVE_TYPE) | |
static void | flushRow (const QRegionSpan *spans, int y, int numSpans, QRegionPrivate *reg, int *lastRow, int *extendTo, bool *needsExtend) |
static void | PtsToRegion (int numFullPtBlocks, int iCurPtBlock, POINTBLOCK *FirstPtBlock, QRegionPrivate *reg) |
static QRegionPrivate * | PolygonRegion (const QPoint *Pts, int Count, int rule) |
QRegionPrivate * | qt_bitmapToRegion (const QBitmap &bitmap) |
Q_GUI_EXPORT bool | qt_region_strictContains (const QRegion ®ion, const QRect &rect) |
static Q_DECL_COLD_FUNCTION void | set_rects_warn (const char *what) |
Variables | |
static Q_CONSTINIT QRegionPrivate | qrp |
#define _XREGION_H |
Definition at line 1658 of file qregion.cpp.
#define AddSpan |
#define BRESINCRPGON | ( | d, | |
minval, | |||
m, | |||
m1, | |||
incr1, | |||
incr2 ) |
Definition at line 2850 of file qregion.cpp.
#define BRESINCRPGONSTRUCT | ( | bres | ) |
Definition at line 2892 of file qregion.cpp.
Definition at line 2827 of file qregion.cpp.
#define BRESINITPGONSTRUCT | ( | dmaj, | |
min1, | |||
min2, | |||
bres ) |
Definition at line 2888 of file qregion.cpp.
#define CLOCKWISE 1 |
Definition at line 2946 of file qregion.cpp.
#define COUNTERCLOCKWISE -1 |
Definition at line 2947 of file qregion.cpp.
#define EVALUATEEDGEEVENODD | ( | pAET, | |
pPrevAET, | |||
y ) |
Definition at line 3023 of file qregion.cpp.
#define EVALUATEEDGEWINDING | ( | pAET, | |
pPrevAET, | |||
y, | |||
fixWAET ) |
Definition at line 3000 of file qregion.cpp.
#define EvenOddRule 0 |
Definition at line 1604 of file qregion.cpp.
#define EXTENTCHECK | ( | r1, | |
r2 ) |
Definition at line 1668 of file qregion.cpp.
#define EXTENTS | ( | r, | |
idRect ) |
#define LARGE_COORDINATE INT_MAX |
Definition at line 3088 of file qregion.cpp.
#define MEMCHECK | ( | dest, | |
rect, | |||
firstrect ) |
Definition at line 1691 of file qregion.cpp.
#define MERGERECT | ( | r | ) |
#define NUMPTSTOBUFFER 200 |
Definition at line 1703 of file qregion.cpp.
#define QRGN_AND 7 |
Definition at line 187 of file qregion.cpp.
#define QRGN_OR 6 |
Definition at line 186 of file qregion.cpp.
#define QRGN_RECTS 10 |
Definition at line 190 of file qregion.cpp.
#define QRGN_SETELLIPSE 2 |
Definition at line 182 of file qregion.cpp.
#define QRGN_SETPTARRAY_ALT 3 |
Definition at line 183 of file qregion.cpp.
#define QRGN_SETPTARRAY_WIND 4 |
Definition at line 184 of file qregion.cpp.
#define QRGN_SETRECT 1 |
Definition at line 181 of file qregion.cpp.
#define QRGN_SUB 8 |
Definition at line 188 of file qregion.cpp.
#define QRGN_TRANSLATE 5 |
Definition at line 185 of file qregion.cpp.
#define QRGN_XOR 9 |
Definition at line 189 of file qregion.cpp.
#define RectangleIn 1 |
Definition at line 1602 of file qregion.cpp.
#define RectangleOut 0 |
Definition at line 1601 of file qregion.cpp.
#define RectanglePart 2 |
Definition at line 1603 of file qregion.cpp.
#define SLLSPERBLOCK 25 |
Definition at line 2978 of file qregion.cpp.
#define SMALL_COORDINATE INT_MIN |
Definition at line 3089 of file qregion.cpp.
#define WindingRule 1 |
Definition at line 1605 of file qregion.cpp.
typedef struct _EdgeTableEntry EdgeTableEntry |
typedef void(* NonOverlapFunc)(QRegionPrivate &dest, const QRect *r, const QRect *rEnd, int y1, int y2) |
Definition at line 1592 of file qregion.cpp.
typedef void(* OverlapFunc)(QRegionPrivate &dest, const QRect *r1, const QRect *r1End, const QRect *r2, const QRect *r2End, int y1, int y2) |
Definition at line 1590 of file qregion.cpp.
typedef struct _POINTBLOCK POINTBLOCK |
typedef struct _ScanLineList ScanLineList |
typedef struct _ScanLineListBlock ScanLineListBlock |
|
inlinestatic |
Definition at line 1194 of file qregion.cpp.
Referenced by QRegionPrivate::mergeFromAbove(), and QRegionPrivate::mergeFromBelow().
Definition at line 1169 of file qregion.cpp.
References canMergeFromRight().
Referenced by QRegionPrivate::mergeFromLeft().
Definition at line 1162 of file qregion.cpp.
Referenced by canMergeFromLeft(), and QRegionPrivate::mergeFromRight().
|
static |
Definition at line 3311 of file qregion.cpp.
|
static |
Definition at line 3181 of file qregion.cpp.
|
static |
Definition at line 2639 of file qregion.cpp.
References QRegionPrivate::numRects.
Referenced by SubtractRegion(), UnionRectWithRegion(), UnionRegion(), and XorRegion().
|
inlinestatic |
Definition at line 3400 of file qregion.cpp.
|
static |
Definition at line 3378 of file qregion.cpp.
|
static |
Definition at line 3100 of file qregion.cpp.
|
static |
Definition at line 3345 of file qregion.cpp.
|
inlinestatic |
Definition at line 1157 of file qregion.cpp.
References QRegionPrivate::numRects.
Referenced by QRegionPrivate::append(), PointInRegion(), QRegionPrivate::prepend(), SubtractRegion(), UnionRegion(), and XorRegion().
|
static |
Definition at line 3267 of file qregion.cpp.
|
static |
Definition at line 1972 of file qregion.cpp.
References QRegionPrivate::numRects, and QRegionPrivate::updateInnerRect().
Referenced by miRegionOp().
|
static |
Definition at line 1907 of file qregion.cpp.
References QRegionPrivate::numRects.
|
static |
Definition at line 2101 of file qregion.cpp.
References miCoalesce(), QRegionPrivate::numRects, and QRegionPrivate::vectorize().
Referenced by SubtractRegion(), and UnionRegion().
|
static |
Definition at line 1827 of file qregion.cpp.
References QRegionPrivate::innerArea, QRegionPrivate::numRects, and QRegionPrivate::updateInnerRect().
Referenced by SubtractRegion().
|
static |
Definition at line 2449 of file qregion.cpp.
References QRegionPrivate::numRects.
Referenced by SubtractRegion().
|
static |
Definition at line 2483 of file qregion.cpp.
References QRegionPrivate::numRects.
Referenced by SubtractRegion().
|
static |
Definition at line 2324 of file qregion.cpp.
References QRegionPrivate::numRects.
Referenced by UnionRegion().
|
static |
Definition at line 2360 of file qregion.cpp.
References QRegionPrivate::numRects.
Referenced by UnionRegion().
|
static |
Definition at line 1876 of file qregion.cpp.
References QRegionPrivate::numRects.
Definition at line 355 of file qregion.cpp.
|
static |
Definition at line 2661 of file qregion.cpp.
References isEmptyHelper(), and QRegionPrivate::numRects.
|
static |
Definition at line 3514 of file qregion.cpp.
References QRegionPrivate::innerArea, _POINTBLOCK::next, QRegionPrivate::numRects, _POINTBLOCK::pts, and QRegionPrivate::vectorize().
|
static |
Definition at line 3444 of file qregion.cpp.
References QRegionPrivate::innerArea, _POINTBLOCK::next, QRegionPrivate::numRects, _POINTBLOCK::pts, and QRegionPrivate::updateInnerRect().
Q_DECLARE_TYPEINFO | ( | QRegionSpan | , |
Q_PRIMITIVE_TYPE | ) |
Q_DECLARE_TYPEINFO | ( | Segment | , |
Q_PRIMITIVE_TYPE | ) |
QRegionPrivate * qt_bitmapToRegion | ( | const QBitmap & | bitmap | ) |
Definition at line 3718 of file qregion.cpp.
Definition at line 1232 of file qregion.cpp.
Returns true
if rect is guaranteed to be fully contained in region. A false return value does not guarantee the opposite.
Definition at line 4170 of file qregion.cpp.
Q_GUI_EXPORT QPainterPath qt_regionToPath | ( | const QRegion & | region | ) |
Definition at line 1010 of file qregion.cpp.
Referenced by QX11PaintEngine::updateState().
Definition at line 593 of file qregion.cpp.
|
static |
Definition at line 2680 of file qregion.cpp.
References QRegionPrivate::numRects.
|
static |
Definition at line 4213 of file qregion.cpp.
|
static |
Definition at line 2584 of file qregion.cpp.
References QRegionPrivate::contains(), EqualRegion(), isEmptyHelper(), miRegionOp(), miSetExtents(), miSubtractNonO1(), and miSubtractO().
Referenced by XorRegion().
|
static |
Definition at line 1794 of file qregion.cpp.
References QRegionPrivate::QRegionPrivate(), QRegionPrivate::append(), QRegionPrivate::canAppend(), EqualRegion(), QRegionPrivate::numRects, and UnionRegion().
|
static |
Definition at line 2406 of file qregion.cpp.
References QRegionPrivate::canAppend(), QRegionPrivate::contains(), EqualRegion(), QRegionPrivate::innerArea, isEmptyHelper(), miRegionOp(), miUnionNonO(), and miUnionO().
Referenced by UnionRectWithRegion(), and XorRegion().
|
static |
Definition at line 2605 of file qregion.cpp.
References QRegionPrivate::append(), QRegionPrivate::canAppend(), QRegionPrivate::contains(), EqualRegion(), isEmptyHelper(), SubtractRegion(), and UnionRegion().
|
static |
Definition at line 1587 of file qregion.cpp.