33 #define MAXINT 0x7fffffff
34 #define MININT -MAXINT
60 ScanLineListBlock **SLLBlock;
63 register EdgeTableEntry *
start, *prev;
64 register ScanLineList *pSLL, *pPrevSLL;
65 ScanLineListBlock *tmpSLLBlock;
71 pSLL = pPrevSLL->next;
72 while (pSLL && (pSLL->scanline < scanline)) {
80 if ((!pSLL) || (pSLL->scanline > scanline)) {
83 (ScanLineListBlock *) malloc(
sizeof (ScanLineListBlock));
86 (*SLLBlock)->next = tmpSLLBlock;
87 tmpSLLBlock->next = (ScanLineListBlock *)
NULL;
88 *SLLBlock = tmpSLLBlock;
91 pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
93 pSLL->next = pPrevSLL->next;
94 pSLL->edgelist = (EdgeTableEntry *)
NULL;
95 pPrevSLL->next = pSLL;
97 pSLL->scanline = scanline;
102 prev = (EdgeTableEntry *)
NULL;
103 start = pSLL->edgelist;
104 while (
start && (
start->bres.minor < ETE->bres.minor)) {
113 pSLL->edgelist = ETE;
145 register DDXPointPtr pts;
148 register EdgeTableEntry *pETEs;
149 ScanLineListBlock *pSLLBlock;
152 register DDXPointPtr PrevPt, CurrPt;
162 AET->next = (EdgeTableEntry *)
NULL;
163 AET->back = (EdgeTableEntry *)
NULL;
164 AET->nextWETE = (EdgeTableEntry *)
NULL;
173 pSLLBlock->next = (ScanLineListBlock *)
NULL;
175 PrevPt = &pts[
count - 1];
188 if (PrevPt->y > CurrPt->y) {
190 pETEs->ClockWise = 0;
193 pETEs->ClockWise = 1;
200 pETEs->ymax =
bottom->y - 1;
234 register EdgeTableEntry *AET, *ETEs;
236 register EdgeTableEntry *pPrevAET;
237 register EdgeTableEntry *
tmp;
242 while (AET && (AET->bres.minor < ETEs->bres.minor)) {
250 ETEs->back = pPrevAET;
251 pPrevAET->next = ETEs;
280 register EdgeTableEntry *AET;
282 register EdgeTableEntry *pWETE;
283 register int inside = 1;
284 register int isInside = 0;
286 AET->nextWETE = (EdgeTableEntry *)
NULL;
295 if ((!inside && !isInside) ||
296 (inside && isInside)) {
297 pWETE->nextWETE = AET;
303 pWETE->nextWETE = (EdgeTableEntry *)
NULL;
317 register EdgeTableEntry *AET;
319 register EdgeTableEntry *pETEchase;
320 register EdgeTableEntry *pETEinsert;
321 register EdgeTableEntry *pETEchaseBackTMP;
322 register int changed = 0;
328 while (pETEchase->back->bres.minor > AET->bres.minor)
329 pETEchase = pETEchase->back;
332 if (pETEchase != pETEinsert) {
333 pETEchaseBackTMP = pETEchase->back;
334 pETEinsert->back->next = AET;
336 AET->back = pETEinsert->back;
337 pETEinsert->next = pETEchase;
338 pETEchase->back->next = pETEinsert;
339 pETEchase->back = pETEinsert;
340 pETEinsert->back = pETEchaseBackTMP;
352 register ScanLineListBlock *pSLLBlock;
354 register ScanLineListBlock *tmpSLLBlock;
357 tmpSLLBlock = pSLLBlock->next;
359 pSLLBlock = tmpSLLBlock;