mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:13:00 +00:00
[WIN32K]
Apply proper formatting to polyfill.c svn path=/trunk/; revision=66645
This commit is contained in:
parent
fe4dc5d9d5
commit
42587dd1d3
1 changed files with 389 additions and 378 deletions
|
@ -77,6 +77,7 @@ FASTCALL
|
|||
POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST* list)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (list)
|
||||
{
|
||||
if (list->Edges)
|
||||
|
@ -86,8 +87,10 @@ POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST* list)
|
|||
if (list->Edges[i])
|
||||
EngFreeMem(list->Edges[i]);
|
||||
}
|
||||
|
||||
EngFreeMem(list->Edges);
|
||||
}
|
||||
|
||||
EngFreeMem(list);
|
||||
}
|
||||
}
|
||||
|
@ -189,6 +192,7 @@ POLYGONFILL_ActiveListInsert(FILL_EDGE** activehead, FILL_EDGE* NewEdge )
|
|||
FILL_EDGE *pPrev, *pThis;
|
||||
//DPRINT1("In POLYGONFILL_ActiveListInsert()\n");
|
||||
ASSERT(activehead && NewEdge);
|
||||
|
||||
if (!*activehead)
|
||||
{
|
||||
NewEdge->pNext = NULL;
|
||||
|
@ -204,6 +208,7 @@ POLYGONFILL_ActiveListInsert(FILL_EDGE** activehead, FILL_EDGE* NewEdge )
|
|||
*activehead = NewEdge;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
** Ok, now scan to the next spot to put this item.
|
||||
*/
|
||||
|
@ -352,7 +357,10 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
|
|||
static
|
||||
void
|
||||
APIENTRY
|
||||
POLYGONFILL_BuildActiveList ( int Scanline, FILL_EDGE_LIST* list, FILL_EDGE** ActiveHead )
|
||||
POLYGONFILL_BuildActiveList(
|
||||
int Scanline,
|
||||
FILL_EDGE_LIST* list,
|
||||
FILL_EDGE** ActiveHead)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -463,11 +471,10 @@ POLYGONFILL_FillScanLineWinding(
|
|||
if ( winding )
|
||||
{
|
||||
// Check and see if this new line touches the previous...
|
||||
if ( (newx1 >= x1 && newx1 <= x2)
|
||||
|| (newx2 >= x1 && newx2 <= x2)
|
||||
|| (x1 >= newx1 && x1 <= newx2)
|
||||
|| (x2 >= newx2 && x2 <= newx2)
|
||||
)
|
||||
if ((newx1 >= x1 && newx1 <= x2) ||
|
||||
(newx2 >= x1 && newx2 <= x2) ||
|
||||
(x1 >= newx1 && x1 <= newx2) ||
|
||||
(x2 >= newx2 && x2 <= newx2))
|
||||
{
|
||||
// Yup, just tack it on to our existing line
|
||||
x1 = min(x1,newx1);
|
||||
|
@ -494,10 +501,12 @@ POLYGONFILL_FillScanLineWinding(
|
|||
x2 = newx2;
|
||||
}
|
||||
}
|
||||
|
||||
pLeft = pRight;
|
||||
pRight = pLeft->pNext;
|
||||
winding += pLeft->YDirection;
|
||||
}
|
||||
|
||||
// There will always be a line left-over, render it now...
|
||||
BoundRect.left = x1;
|
||||
BoundRect.right = x2;
|
||||
|
@ -616,6 +625,7 @@ IntFillPolygon(
|
|||
{
|
||||
int x1 = pLeft->XIntercept[0];
|
||||
int x2 = pRight->XIntercept[1];
|
||||
|
||||
if (x2 > x1)
|
||||
{
|
||||
RECTL LineRect;
|
||||
|
@ -636,6 +646,7 @@ IntFillPolygon(
|
|||
BrushOrigin,
|
||||
ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY));
|
||||
}
|
||||
|
||||
pLeft = pRight->pNext;
|
||||
pRight = pLeft ? pLeft->pNext : NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue