|
|
@ -89,8 +89,8 @@ struct TQRegionPrivate {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
|
|
|
|
static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
|
|
|
|
static void IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionPrivate *newReg);
|
|
|
|
static void IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
|
|
|
|
static void miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
|
|
|
|
static void miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
|
|
|
|
void (*overlapFunc)(...),
|
|
|
|
void (*overlapFunc)(...),
|
|
|
|
void (*nonOverlap1Func)(...),
|
|
|
|
void (*nonOverlap1Func)(...),
|
|
|
|
void (*nonOverlap2Func)(...));
|
|
|
|
void (*nonOverlap2Func)(...));
|
|
|
@ -300,7 +300,7 @@ typedef void (*voidProcp)(...);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static
|
|
|
|
static
|
|
|
|
void UnionRectWithRegion(register const TQRect *rect, TQRegionPrivate *source, TQRegionPrivate *dest)
|
|
|
|
void UnionRectWithRegion(const TQRect *rect, TQRegionPrivate *source, TQRegionPrivate *dest)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQRegionPrivate region;
|
|
|
|
TQRegionPrivate region;
|
|
|
|
|
|
|
|
|
|
|
@ -333,7 +333,7 @@ void UnionRectWithRegion(register const TQRect *rect, TQRegionPrivate *source, T
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
miSetExtents (TQRegionPrivate *pReg)
|
|
|
|
miSetExtents (TQRegionPrivate *pReg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *pBox,
|
|
|
|
TQRect *pBox,
|
|
|
|
*pBoxEnd,
|
|
|
|
*pBoxEnd,
|
|
|
|
*pExtents;
|
|
|
|
*pExtents;
|
|
|
|
|
|
|
|
|
|
|
@ -383,10 +383,10 @@ miSetExtents (TQRegionPrivate *pReg)
|
|
|
|
|
|
|
|
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
OffsetRegion(register TQRegionPrivate *pRegion, register int x, register int y)
|
|
|
|
OffsetRegion(TQRegionPrivate *pRegion, int x, int y)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register int nbox;
|
|
|
|
int nbox;
|
|
|
|
register TQRect *pbox;
|
|
|
|
TQRect *pbox;
|
|
|
|
|
|
|
|
|
|
|
|
pbox = pRegion->rects.data();
|
|
|
|
pbox = pRegion->rects.data();
|
|
|
|
nbox = pRegion->numRects;
|
|
|
|
nbox = pRegion->numRects;
|
|
|
@ -419,12 +419,12 @@ OffsetRegion(register TQRegionPrivate *pRegion, register int x, register int y)
|
|
|
|
/* static void*/
|
|
|
|
/* static void*/
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
miIntersectO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
|
|
|
|
miIntersectO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
|
|
|
|
register TQRect *r2, TQRect *r2End, int y1, int y2)
|
|
|
|
TQRect *r2, TQRect *r2End, int y1, int y2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register int x1;
|
|
|
|
int x1;
|
|
|
|
register int x2;
|
|
|
|
int x2;
|
|
|
|
register TQRect *pNextRect;
|
|
|
|
TQRect *pNextRect;
|
|
|
|
|
|
|
|
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
|
|
|
|
|
|
|
@ -474,7 +474,7 @@ miIntersectO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End
|
|
|
|
|
|
|
|
|
|
|
|
static
|
|
|
|
static
|
|
|
|
void
|
|
|
|
void
|
|
|
|
IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionPrivate *newReg)
|
|
|
|
IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* check for trivial reject */
|
|
|
|
/* check for trivial reject */
|
|
|
|
if ( (!(reg1->numRects)) || (!(reg2->numRects)) ||
|
|
|
|
if ( (!(reg1->numRects)) || (!(reg2->numRects)) ||
|
|
|
@ -519,14 +519,14 @@ IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionP
|
|
|
|
/* static int*/
|
|
|
|
/* static int*/
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
miCoalesce (register TQRegionPrivate *pReg, int prevStart, int curStart)
|
|
|
|
miCoalesce (TQRegionPrivate *pReg, int prevStart, int curStart)
|
|
|
|
//Region pReg; /* Region to coalesce */
|
|
|
|
//Region pReg; /* Region to coalesce */
|
|
|
|
//prevStart; /* Index of start of previous band */
|
|
|
|
//prevStart; /* Index of start of previous band */
|
|
|
|
//curStart; /* Index of start of current band */
|
|
|
|
//curStart; /* Index of start of current band */
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *pPrevBox; /* Current box in previous band */
|
|
|
|
TQRect *pPrevBox; /* Current box in previous band */
|
|
|
|
register TQRect *pCurBox; /* Current box in current band */
|
|
|
|
TQRect *pCurBox; /* Current box in current band */
|
|
|
|
register TQRect *pRegEnd; /* End of region */
|
|
|
|
TQRect *pRegEnd; /* End of region */
|
|
|
|
int curNumRects; /* Number of rectangles in current
|
|
|
|
int curNumRects; /* Number of rectangles in current
|
|
|
|
* band */
|
|
|
|
* band */
|
|
|
|
int prevNumRects; /* Number of rectangles in previous
|
|
|
|
int prevNumRects; /* Number of rectangles in previous
|
|
|
@ -670,11 +670,11 @@ miCoalesce (register TQRegionPrivate *pReg, int prevStart, int curStart)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
/* static void*/
|
|
|
|
/* static void*/
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
|
|
|
|
miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
|
|
|
|
void (*overlapFunc)(...),
|
|
|
|
void (*overlapFunc)(...),
|
|
|
|
void (*nonOverlap1Func)(...),
|
|
|
|
void (*nonOverlap1Func)(...),
|
|
|
|
void (*nonOverlap2Func)(...))
|
|
|
|
void (*nonOverlap2Func)(...))
|
|
|
|
//register Region newReg; /* Place to store result */
|
|
|
|
//Region newReg; /* Place to store result */
|
|
|
|
//Region reg1; /* First region in operation */
|
|
|
|
//Region reg1; /* First region in operation */
|
|
|
|
//Region reg2; /* 2d region in operation */
|
|
|
|
//Region reg2; /* 2d region in operation */
|
|
|
|
//void (*overlapFunc)(); /* Function to call for over-
|
|
|
|
//void (*overlapFunc)(); /* Function to call for over-
|
|
|
@ -686,18 +686,18 @@ miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPriv
|
|
|
|
//* overlapping bands in region
|
|
|
|
//* overlapping bands in region
|
|
|
|
//* 2 */
|
|
|
|
//* 2 */
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *r1; /* Pointer into first region */
|
|
|
|
TQRect *r1; /* Pointer into first region */
|
|
|
|
register TQRect *r2; /* Pointer into 2d region */
|
|
|
|
TQRect *r2; /* Pointer into 2d region */
|
|
|
|
TQRect *r1End; /* End of 1st region */
|
|
|
|
TQRect *r1End; /* End of 1st region */
|
|
|
|
TQRect *r2End; /* End of 2d region */
|
|
|
|
TQRect *r2End; /* End of 2d region */
|
|
|
|
register int ybot; /* Bottom of intersection */
|
|
|
|
int ybot; /* Bottom of intersection */
|
|
|
|
register int ytop; /* Top of intersection */
|
|
|
|
int ytop; /* Top of intersection */
|
|
|
|
int prevBand; /* Index of start of
|
|
|
|
int prevBand; /* Index of start of
|
|
|
|
* previous band in newReg */
|
|
|
|
* previous band in newReg */
|
|
|
|
int curBand; /* Index of start of current
|
|
|
|
int curBand; /* Index of start of current
|
|
|
|
* band in newReg */
|
|
|
|
* band in newReg */
|
|
|
|
register TQRect *r1BandEnd; /* End of current band in r1 */
|
|
|
|
TQRect *r1BandEnd; /* End of current band in r1 */
|
|
|
|
register TQRect *r2BandEnd; /* End of current band in r2 */
|
|
|
|
TQRect *r2BandEnd; /* End of current band in r2 */
|
|
|
|
int top; /* Top of non-overlapping
|
|
|
|
int top; /* Top of non-overlapping
|
|
|
|
* band */
|
|
|
|
* band */
|
|
|
|
int bot; /* Bottom of non-overlapping
|
|
|
|
int bot; /* Bottom of non-overlapping
|
|
|
@ -951,10 +951,10 @@ miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPriv
|
|
|
|
/* static void*/
|
|
|
|
/* static void*/
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
miUnionNonO (register TQRegionPrivate *pReg, register TQRect * r,
|
|
|
|
miUnionNonO (TQRegionPrivate *pReg, TQRect * r,
|
|
|
|
TQRect * rEnd, register int y1, register int y2)
|
|
|
|
TQRect * rEnd, int y1, int y2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect * pNextRect;
|
|
|
|
TQRect * pNextRect;
|
|
|
|
|
|
|
|
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
|
|
|
|
|
|
|
@ -993,10 +993,10 @@ miUnionNonO (register TQRegionPrivate *pReg, register TQRect * r,
|
|
|
|
/* static void*/
|
|
|
|
/* static void*/
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
miUnionO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
|
|
|
|
miUnionO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
|
|
|
|
register TQRect *r2, TQRect *r2End, register int y1, register int y2)
|
|
|
|
TQRect *r2, TQRect *r2End, int y1, int y2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *pNextRect;
|
|
|
|
TQRect *pNextRect;
|
|
|
|
|
|
|
|
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
|
|
|
|
|
|
|
@ -1121,10 +1121,10 @@ static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPr
|
|
|
|
/* static void*/
|
|
|
|
/* static void*/
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
miSubtractNonO1 (register TQRegionPrivate *pReg, register TQRect *r,
|
|
|
|
miSubtractNonO1 (TQRegionPrivate *pReg, TQRect *r,
|
|
|
|
TQRect *rEnd, register int y1, register int y2)
|
|
|
|
TQRect *rEnd, int y1, int y2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *pNextRect;
|
|
|
|
TQRect *pNextRect;
|
|
|
|
|
|
|
|
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
pNextRect = pReg->rects.data() + pReg->numRects;
|
|
|
|
|
|
|
|
|
|
|
@ -1160,11 +1160,11 @@ miSubtractNonO1 (register TQRegionPrivate *pReg, register TQRect *r,
|
|
|
|
/* static void*/
|
|
|
|
/* static void*/
|
|
|
|
static
|
|
|
|
static
|
|
|
|
int
|
|
|
|
int
|
|
|
|
miSubtractO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
|
|
|
|
miSubtractO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
|
|
|
|
register TQRect *r2, TQRect *r2End, register int y1, register int y2)
|
|
|
|
TQRect *r2, TQRect *r2End, int y1, int y2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *pNextRect;
|
|
|
|
TQRect *pNextRect;
|
|
|
|
register int x1;
|
|
|
|
int x1;
|
|
|
|
|
|
|
|
|
|
|
|
x1 = r1->left();
|
|
|
|
x1 = r1->left();
|
|
|
|
|
|
|
|
|
|
|
@ -1285,7 +1285,7 @@ miSubtractO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
|
|
|
|
*-----------------------------------------------------------------------
|
|
|
|
*-----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, register TQRegionPrivate *regD)
|
|
|
|
static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, TQRegionPrivate *regD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* check for trivial reject */
|
|
|
|
/* check for trivial reject */
|
|
|
|
if ( (!(regM->numRects)) || (!(regS->numRects)) ||
|
|
|
|
if ( (!(regM->numRects)) || (!(regS->numRects)) ||
|
|
|
@ -1361,13 +1361,13 @@ static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
|
|
|
|
return FALSE;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool RectInRegion(register TQRegionPrivate *region,
|
|
|
|
static bool RectInRegion(TQRegionPrivate *region,
|
|
|
|
int rx, int ry, unsigned int rwidth, unsigned int rheight)
|
|
|
|
int rx, int ry, unsigned int rwidth, unsigned int rheight)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *pbox;
|
|
|
|
TQRect *pbox;
|
|
|
|
register TQRect *pboxEnd;
|
|
|
|
TQRect *pboxEnd;
|
|
|
|
TQRect rect(rx, ry, rwidth, rheight);
|
|
|
|
TQRect rect(rx, ry, rwidth, rheight);
|
|
|
|
register TQRect *prect = ▭
|
|
|
|
TQRect *prect = ▭
|
|
|
|
int partIn, partOut;
|
|
|
|
int partIn, partOut;
|
|
|
|
|
|
|
|
|
|
|
|
/* this is (just) a useful optimization */
|
|
|
|
/* this is (just) a useful optimization */
|
|
|
@ -1800,8 +1800,8 @@ static void
|
|
|
|
InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
|
|
|
|
InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
|
|
|
|
ScanLineListBlock **SLLBlock, int *iSLLBlock)
|
|
|
|
ScanLineListBlock **SLLBlock, int *iSLLBlock)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register EdgeTableEntry *start, *prev;
|
|
|
|
EdgeTableEntry *start, *prev;
|
|
|
|
register ScanLineList *pSLL, *pPrevSLL;
|
|
|
|
ScanLineList *pSLL, *pPrevSLL;
|
|
|
|
ScanLineListBlock *tmpSLLBlock;
|
|
|
|
ScanLineListBlock *tmpSLLBlock;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
@ -1881,12 +1881,12 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
CreateETandAET(register int count, register TQPoint *pts,
|
|
|
|
CreateETandAET(int count, TQPoint *pts,
|
|
|
|
EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs,
|
|
|
|
EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs,
|
|
|
|
ScanLineListBlock *pSLLBlock)
|
|
|
|
ScanLineListBlock *pSLLBlock)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQPoint *top, *bottom;
|
|
|
|
TQPoint *top, *bottom;
|
|
|
|
register TQPoint *PrevPt, *CurrPt;
|
|
|
|
TQPoint *PrevPt, *CurrPt;
|
|
|
|
int iSLLBlock = 0;
|
|
|
|
int iSLLBlock = 0;
|
|
|
|
int dy;
|
|
|
|
int dy;
|
|
|
|
|
|
|
|
|
|
|
@ -1969,10 +1969,10 @@ CreateETandAET(register int count, register TQPoint *pts,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
|
|
|
|
loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register EdgeTableEntry *pPrevAET;
|
|
|
|
EdgeTableEntry *pPrevAET;
|
|
|
|
register EdgeTableEntry *tmp;
|
|
|
|
EdgeTableEntry *tmp;
|
|
|
|
|
|
|
|
|
|
|
|
pPrevAET = AET;
|
|
|
|
pPrevAET = AET;
|
|
|
|
AET = AET->next;
|
|
|
|
AET = AET->next;
|
|
|
@ -2016,11 +2016,11 @@ loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
computeWAET(register EdgeTableEntry *AET)
|
|
|
|
computeWAET(EdgeTableEntry *AET)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register EdgeTableEntry *pWETE;
|
|
|
|
EdgeTableEntry *pWETE;
|
|
|
|
register int inside = 1;
|
|
|
|
int inside = 1;
|
|
|
|
register int isInside = 0;
|
|
|
|
int isInside = 0;
|
|
|
|
|
|
|
|
|
|
|
|
AET->nextWETE = (EdgeTableEntry *)NULL;
|
|
|
|
AET->nextWETE = (EdgeTableEntry *)NULL;
|
|
|
|
pWETE = AET;
|
|
|
|
pWETE = AET;
|
|
|
@ -2054,12 +2054,12 @@ computeWAET(register EdgeTableEntry *AET)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
static int
|
|
|
|
InsertionSort(register EdgeTableEntry *AET)
|
|
|
|
InsertionSort(EdgeTableEntry *AET)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register EdgeTableEntry *pETEchase;
|
|
|
|
EdgeTableEntry *pETEchase;
|
|
|
|
register EdgeTableEntry *pETEinsert;
|
|
|
|
EdgeTableEntry *pETEinsert;
|
|
|
|
register EdgeTableEntry *pETEchaseBackTMP;
|
|
|
|
EdgeTableEntry *pETEchaseBackTMP;
|
|
|
|
register int changed = 0;
|
|
|
|
int changed = 0;
|
|
|
|
|
|
|
|
|
|
|
|
AET = AET->next;
|
|
|
|
AET = AET->next;
|
|
|
|
while (AET)
|
|
|
|
while (AET)
|
|
|
@ -2090,9 +2090,9 @@ InsertionSort(register EdgeTableEntry *AET)
|
|
|
|
* Clean up our act.
|
|
|
|
* Clean up our act.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
FreeStorage(register ScanLineListBlock *pSLLBlock)
|
|
|
|
FreeStorage(ScanLineListBlock *pSLLBlock)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register ScanLineListBlock *tmpSLLBlock;
|
|
|
|
ScanLineListBlock *tmpSLLBlock;
|
|
|
|
|
|
|
|
|
|
|
|
while (pSLLBlock)
|
|
|
|
while (pSLLBlock)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2110,15 +2110,15 @@ FreeStorage(register ScanLineListBlock *pSLLBlock)
|
|
|
|
* stack by the calling procedure.
|
|
|
|
* stack by the calling procedure.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static int PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock,
|
|
|
|
static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
|
|
|
|
POINTBLOCK *FirstPtBlock, TQRegionPrivate *reg)
|
|
|
|
POINTBLOCK *FirstPtBlock, TQRegionPrivate *reg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
register TQRect *rects;
|
|
|
|
TQRect *rects;
|
|
|
|
register TQPoint *pts;
|
|
|
|
TQPoint *pts;
|
|
|
|
register POINTBLOCK *CurPtBlock;
|
|
|
|
POINTBLOCK *CurPtBlock;
|
|
|
|
register int i;
|
|
|
|
int i;
|
|
|
|
register TQRect *extents;
|
|
|
|
TQRect *extents;
|
|
|
|
register int numRects;
|
|
|
|
int numRects;
|
|
|
|
|
|
|
|
|
|
|
|
extents = ®->extents;
|
|
|
|
extents = ®->extents;
|
|
|
|
|
|
|
|
|
|
|
@ -2182,12 +2182,12 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
|
|
|
|
//int rule; /* winding rule */
|
|
|
|
//int rule; /* winding rule */
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQRegionPrivate *region;
|
|
|
|
TQRegionPrivate *region;
|
|
|
|
register EdgeTableEntry *pAET; /* Active Edge Table */
|
|
|
|
EdgeTableEntry *pAET; /* Active Edge Table */
|
|
|
|
register int y; /* current scanline */
|
|
|
|
int y; /* current scanline */
|
|
|
|
register int iPts = 0; /* number of pts in buffer */
|
|
|
|
int iPts = 0; /* number of pts in buffer */
|
|
|
|
register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
|
|
|
|
EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
|
|
|
|
register ScanLineList *pSLL; /* current scanLineList */
|
|
|
|
ScanLineList *pSLL; /* current scanLineList */
|
|
|
|
register TQPoint *pts; /* output buffer */
|
|
|
|
TQPoint *pts; /* output buffer */
|
|
|
|
EdgeTableEntry *pPrevAET; /* ptr to previous AET */
|
|
|
|
EdgeTableEntry *pPrevAET; /* ptr to previous AET */
|
|
|
|
EdgeTable ET; /* header node for ET */
|
|
|
|
EdgeTable ET; /* header node for ET */
|
|
|
|
EdgeTableEntry AET; /* header node for AET */
|
|
|
|
EdgeTableEntry AET; /* header node for AET */
|
|
|
|