Qt 4.8
|
#include "qregion.h"
#include "qpainterpath.h"
#include "qpolygon.h"
#include "qbuffer.h"
#include "qdatastream.h"
#include "qvariant.h"
#include "qvarlengtharray.h"
#include <qdebug.h>
#include "qimage.h"
#include "qbitmap.h"
#include <stdlib.h>
#include "qregion_x11.cpp"
#include <limits.h>
Go to the source code of this file.
Classes | |
struct | _EdgeTableEntry |
struct | _POINTBLOCK |
struct | _ScanLineList |
struct | _ScanLineListBlock |
struct | BRESINFO |
struct | EdgeTable |
struct | QRegionPrivate |
struct | QRegionSpan |
Macros | |
#define | _XREGION_H |
#define | AddSpan |
#define | BRESINCRPGON(d, minval, m, m1, incr1, incr2) |
#define | BRESINCRPGONSTRUCT(bres) BRESINCRPGON(bres.d, bres.minor_axis, bres.m, bres.m1, bres.incr1, bres.incr2) |
#define | BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) |
#define | BRESINITPGONSTRUCT(dmaj, min1, min2, bres) |
#define | CLOCKWISE 1 |
#define | COUNTERCLOCKWISE -1 |
#define | EVALUATEEDGEEVENODD(pAET, pPrevAET, y) |
#define | EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) |
#define | EvenOddRule 0 |
#define | EXTENTCHECK(r1, r2) |
#define | EXTENTS(r, idRect) |
#define | LARGE_COORDINATE INT_MAX |
#define | MEMCHECK(dest, rect, firstrect) |
#define | MERGERECT(r) |
#define | NUMPTSTOBUFFER 200 |
#define | QRGN_AND 7 |
#define | QRGN_OR 6 |
#define | QRGN_RECTS 10 |
#define | QRGN_SETELLIPSE 2 |
#define | QRGN_SETPTARRAY_ALT 3 |
#define | QRGN_SETPTARRAY_WIND 4 |
#define | QRGN_SETRECT 1 |
#define | QRGN_SUB 8 |
#define | QRGN_TRANSLATE 5 |
#define | QRGN_XOR 9 |
#define | RectangleIn 1 |
#define | RectangleOut 0 |
#define | RectanglePart 2 |
#define | SLLSPERBLOCK 25 |
#define | SMALL_COORDINATE INT_MIN |
#define | WindingRule 1 |
Typedefs | |
typedef struct _EdgeTableEntry | EdgeTableEntry |
typedef void(* | NonOverlapFunc) (register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd, register int y1, register int y2) |
typedef void(* | OverlapFunc) (register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End, register const QRect *r2, const QRect *r2End, register int y1, register int y2) |
typedef struct _POINTBLOCK | POINTBLOCK |
typedef struct _ScanLineList | ScanLineList |
typedef struct _ScanLineListBlock | ScanLineListBlock |
Functions | |
static bool | canMergeFromBelow (const QRect *top, const QRect *bottom, const QRect *nextToTop, const QRect *nextToBottom) |
static bool | canMergeFromLeft (const QRect *right, const QRect *left) |
static bool | canMergeFromRight (const QRect *left, const QRect *right) |
static void | computeWAET (register EdgeTableEntry *AET) |
static void | CreateETandAET (register int count, register const QPoint *pts, EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) |
static bool | EqualRegion (const QRegionPrivate *r1, const QRegionPrivate *r2) |
static void | flushRow (const QRegionSpan *spans, int y, int numSpans, QRegionPrivate *reg, int *lastRow, int *extendTo, bool *needsExtend) |
static void | FreeStorage (register ScanLineListBlock *pSLLBlock) |
static void | InsertEdgeInET (EdgeTable *ET, EdgeTableEntry *ETE, int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) |
static int | InsertionSort (register EdgeTableEntry *AET) |
static bool | isEmptyHelper (const QRegionPrivate *preg) |
static void | loadAET (register EdgeTableEntry *AET, register EdgeTableEntry *ETEs) |
static int | miCoalesce (register QRegionPrivate &dest, int prevStart, int curStart) |
static void | miIntersectO (register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End, register const QRect *r2, const QRect *r2End, int y1, int y2) |
static void | miRegionOp (register QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2, OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func, NonOverlapFunc nonOverlap2Func) |
static void | miSetExtents (QRegionPrivate &dest) |
static void | miSubtractNonO1 (register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd, register int y1, register int y2) |
static void | miSubtractO (register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End, register const QRect *r2, const QRect *r2End, register int y1, register int y2) |
static void | miUnionNonO (register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd, register int y1, register int y2) |
static void | miUnionO (register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End, register const QRect *r2, const QRect *r2End, register int y1, register int y2) |
static void | OffsetRegion (register QRegionPrivate ®ion, register int x, register int y) |
QDebug | operator<< (QDebug s, const QRegion &r) |
static bool | PointInRegion (QRegionPrivate *pRegion, int x, int y) |
static QRegionPrivate * | PolygonRegion (const QPoint *Pts, int Count, int rule) |
static void | PtsToRegion (register int numFullPtBlocks, register int iCurPtBlock, POINTBLOCK *FirstPtBlock, QRegionPrivate *reg) |
Q_DECLARE_TYPEINFO (QRegionSpan, Q_PRIMITIVE_TYPE) | |
QRegionPrivate * | qt_bitmapToRegion (const QBitmap &bitmap) |
static QRect | qt_rect_intersect_normalized (const QRect &r1, const QRect &r2) |
Q_GUI_EXPORT bool | qt_region_strictContains (const QRegion ®ion, const QRect &rect) |
Returns true if rect is guaranteed to be fully contained in region. More... | |
Q_AUTOTEST_EXPORT QPainterPath | qt_regionToPath (const QRegion ®ion) |
bool | rect_intersects (const QRect &r1, const QRect &r2) |
static bool | RectInRegion (register QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight) |
static void | SubtractRegion (QRegionPrivate *regM, QRegionPrivate *regS, register QRegionPrivate &dest) |
static void | UnionRectWithRegion (register const QRect *rect, const QRegionPrivate *source, QRegionPrivate &dest) |
static void | UnionRegion (const QRegionPrivate *reg1, const QRegionPrivate *reg2, QRegionPrivate &dest) |
static void | XorRegion (QRegionPrivate *sra, QRegionPrivate *srb, QRegionPrivate &dest) |
#define _XREGION_H |
Definition at line 1836 of file qregion.cpp.
#define AddSpan |
Referenced by qt_bitmapToRegion().
#define BRESINCRPGON | ( | d, | |
minval, | |||
m, | |||
m1, | |||
incr1, | |||
incr2 | |||
) |
Definition at line 3024 of file qregion.cpp.
#define BRESINCRPGONSTRUCT | ( | bres | ) | BRESINCRPGON(bres.d, bres.minor_axis, bres.m, bres.m1, bres.incr1, bres.incr2) |
Definition at line 3066 of file qregion.cpp.
#define BRESINITPGON | ( | dy, | |
x1, | |||
x2, | |||
xStart, | |||
d, | |||
m, | |||
m1, | |||
incr1, | |||
incr2 | |||
) |
Definition at line 2998 of file qregion.cpp.
#define BRESINITPGONSTRUCT | ( | dmaj, | |
min1, | |||
min2, | |||
bres | |||
) |
Definition at line 3062 of file qregion.cpp.
Referenced by CreateETandAET().
#define CLOCKWISE 1 |
Definition at line 3120 of file qregion.cpp.
#define COUNTERCLOCKWISE -1 |
Definition at line 3121 of file qregion.cpp.
#define EVALUATEEDGEEVENODD | ( | pAET, | |
pPrevAET, | |||
y | |||
) |
Definition at line 3197 of file qregion.cpp.
Referenced by PolygonRegion().
#define EVALUATEEDGEWINDING | ( | pAET, | |
pPrevAET, | |||
y, | |||
fixWAET | |||
) |
Definition at line 3174 of file qregion.cpp.
Referenced by PolygonRegion().
#define EvenOddRule 0 |
Definition at line 1782 of file qregion.cpp.
Referenced by QX11PaintEnginePrivate::fillPolygon_dev(), PolygonRegion(), and QRegion::QRegion().
#define EXTENTCHECK | ( | r1, | |
r2 | |||
) |
Definition at line 1846 of file qregion.cpp.
Referenced by QRegion::eor(), QRegion::intersect(), RectInRegion(), QRegion::subtract(), SubtractRegion(), and XorRegion().
#define EXTENTS | ( | r, | |
idRect | |||
) |
Definition at line 1855 of file qregion.cpp.
#define LARGE_COORDINATE INT_MAX |
Definition at line 3262 of file qregion.cpp.
Referenced by CreateETandAET().
#define MEMCHECK | ( | dest, | |
rect, | |||
firstrect | |||
) |
Definition at line 1869 of file qregion.cpp.
Referenced by miIntersectO(), miSubtractNonO1(), miSubtractO(), and miUnionNonO().
#define MERGERECT | ( | r | ) |
Referenced by miUnionO().
#define NUMPTSTOBUFFER 200 |
Definition at line 1881 of file qregion.cpp.
Referenced by PolygonRegion(), and PtsToRegion().
#define QRGN_AND 7 |
Definition at line 319 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_OR 6 |
Definition at line 318 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_RECTS 10 |
Definition at line 322 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_SETELLIPSE 2 |
Definition at line 314 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_SETPTARRAY_ALT 3 |
Definition at line 315 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_SETPTARRAY_WIND 4 |
Definition at line 316 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_SETRECT 1 |
Definition at line 313 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_SUB 8 |
Definition at line 320 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_TRANSLATE 5 |
Definition at line 317 of file qregion.cpp.
Referenced by QRegion::exec().
#define QRGN_XOR 9 |
Definition at line 321 of file qregion.cpp.
Referenced by QRegion::exec().
#define RectangleIn 1 |
Definition at line 1780 of file qregion.cpp.
Referenced by RectInRegion().
#define RectangleOut 0 |
Definition at line 1779 of file qregion.cpp.
Referenced by QRegion::contains(), and RectInRegion().
#define RectanglePart 2 |
Definition at line 1781 of file qregion.cpp.
Referenced by RectInRegion().
#define SLLSPERBLOCK 25 |
Definition at line 3152 of file qregion.cpp.
Referenced by InsertEdgeInET().
#define SMALL_COORDINATE INT_MIN |
Definition at line 3263 of file qregion.cpp.
Referenced by CreateETandAET().
#define WindingRule 1 |
Definition at line 1783 of file qregion.cpp.
Referenced by QX11PaintEnginePrivate::fillPolygon_dev(), and QRegion::QRegion().
typedef struct _EdgeTableEntry EdgeTableEntry |
typedef void(* NonOverlapFunc) (register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd, register int y1, register int y2) |
Definition at line 1770 of file qregion.cpp.
typedef void(* OverlapFunc) (register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End, register const QRect *r2, const QRect *r2End, register int y1, register int y2) |
Definition at line 1768 of file qregion.cpp.
typedef struct _POINTBLOCK POINTBLOCK |
typedef struct _ScanLineList ScanLineList |
typedef struct _ScanLineListBlock ScanLineListBlock |
|
inlinestatic |
Definition at line 1358 of file qregion.cpp.
Referenced by QRegionPrivate::intersect(), QRegionPrivate::mergeFromAbove(), and QRegionPrivate::mergeFromBelow().
Definition at line 1333 of file qregion.cpp.
Referenced by QRegionPrivate::mergeFromLeft().
Definition at line 1326 of file qregion.cpp.
Referenced by canMergeFromLeft(), and QRegionPrivate::mergeFromRight().
|
static |
Definition at line 3486 of file qregion.cpp.
Referenced by PolygonRegion().
|
static |
Definition at line 3355 of file qregion.cpp.
Referenced by PolygonRegion().
|
static |
Definition at line 2810 of file qregion.cpp.
Referenced by QRegion::eor(), QRegion::operator+=(), QRegion::operator==(), QRegion::subtract(), SubtractRegion(), UnionRectWithRegion(), UnionRegion(), QRegion::unite(), and XorRegion().
|
inlinestatic |
Definition at line 3575 of file qregion.cpp.
Referenced by PtsToRegion().
|
static |
Definition at line 3553 of file qregion.cpp.
Referenced by PolygonRegion().
|
static |
Definition at line 3274 of file qregion.cpp.
Referenced by CreateETandAET().
|
static |
Definition at line 3520 of file qregion.cpp.
Referenced by PolygonRegion().
|
inlinestatic |
Definition at line 1321 of file qregion.cpp.
Referenced by QRegionPrivate::append(), QRegion::eor(), QRegion::intersect(), QRegion::intersects(), QRegion::operator+=(), PointInRegion(), QRegionPrivate::prepend(), qt_region_strictContains(), QRegion::subtract(), SubtractRegion(), QRegion::translate(), UnionRegion(), QRegion::unite(), and XorRegion().
|
static |
Definition at line 3442 of file qregion.cpp.
Referenced by PolygonRegion().
|
static |
Definition at line 2150 of file qregion.cpp.
Referenced by miRegionOp().
|
static |
Definition at line 2085 of file qregion.cpp.
Referenced by QRegion::intersect().
|
static |
Definition at line 2279 of file qregion.cpp.
Referenced by QRegion::intersect(), SubtractRegion(), and UnionRegion().
|
static |
Definition at line 2005 of file qregion.cpp.
Referenced by QRegion::intersect(), and SubtractRegion().
|
static |
Definition at line 2620 of file qregion.cpp.
Referenced by SubtractRegion().
|
static |
Definition at line 2654 of file qregion.cpp.
Referenced by SubtractRegion().
|
static |
Definition at line 2495 of file qregion.cpp.
Referenced by UnionRegion().
|
static |
Definition at line 2531 of file qregion.cpp.
Referenced by UnionRegion().
|
static |
Definition at line 2054 of file qregion.cpp.
Referenced by QRegion::translate().
Definition at line 492 of file qregion.cpp.
|
static |
Definition at line 2832 of file qregion.cpp.
Referenced by QRegion::contains().
|
static |
Definition at line 3689 of file qregion.cpp.
Referenced by QRegion::QRegion().
|
static |
Definition at line 3619 of file qregion.cpp.
Referenced by PolygonRegion().
Q_DECLARE_TYPEINFO | ( | QRegionSpan | , |
Q_PRIMITIVE_TYPE | |||
) |
Referenced by QRegionSpan::width().
QRegionPrivate* qt_bitmapToRegion | ( | const QBitmap & | bitmap | ) |
Definition at line 3886 of file qregion.cpp.
Referenced by QRegion::QRegion().
Definition at line 1396 of file qregion.cpp.
Referenced by QRegion::intersect(), and QRegionPrivate::intersect().
Q_GUI_EXPORT bool qt_region_strictContains | ( | const QRegion & | region, |
const QRect & | rect | ||
) |
Returns true if rect is guaranteed to be fully contained in region.
A false return value does not guarantee the opposite.
Definition at line 4380 of file qregion.cpp.
Referenced by QRasterPaintEnginePrivate::isUnclipped(), QRasterPaintEnginePrivate::isUnclipped_normalized(), QWidgetBackingStore::markDirty(), and QRegion::operator!=().
Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath | ( | const QRegion & | region | ) |
Definition at line 1160 of file qregion.cpp.
Referenced by QPainter::clipPath(), QPainter::clipRegion(), QGraphicsLineItem::extension(), QGraphicsViewPrivate::findItems(), QGraphicsViewPrivate::freeStyleOptionsArray(), QMatrix::map(), QTransform::map(), QPdfBaseEngine::setupGraphicsState(), QWin32PrintEngine::updateClipPath(), QPdfBaseEngine::updateClipPath(), QGraphicsPixmapItemPrivate::updateShape(), QWin32PrintEngine::updateState(), and QX11PaintEngine::updateState().
Definition at line 751 of file qregion.cpp.
Referenced by QRegion::intersects().
|
static |
Definition at line 2851 of file qregion.cpp.
Referenced by QRegion::contains().
|
static |
Definition at line 2755 of file qregion.cpp.
Referenced by QRegion::subtract(), and XorRegion().
|
static |
Definition at line 1972 of file qregion.cpp.
|
static |
Definition at line 2577 of file qregion.cpp.
Referenced by QRegion::operator+=(), UnionRectWithRegion(), QRegion::unite(), and XorRegion().
|
static |
Definition at line 2776 of file qregion.cpp.
Referenced by QRegion::eor().