mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 16:32:57 +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)
|
POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST* list)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
if (list->Edges)
|
if (list->Edges)
|
||||||
|
@ -86,8 +87,10 @@ POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST* list)
|
||||||
if (list->Edges[i])
|
if (list->Edges[i])
|
||||||
EngFreeMem(list->Edges[i]);
|
EngFreeMem(list->Edges[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
EngFreeMem(list->Edges);
|
EngFreeMem(list->Edges);
|
||||||
}
|
}
|
||||||
|
|
||||||
EngFreeMem(list);
|
EngFreeMem(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,6 +192,7 @@ POLYGONFILL_ActiveListInsert(FILL_EDGE** activehead, FILL_EDGE* NewEdge )
|
||||||
FILL_EDGE *pPrev, *pThis;
|
FILL_EDGE *pPrev, *pThis;
|
||||||
//DPRINT1("In POLYGONFILL_ActiveListInsert()\n");
|
//DPRINT1("In POLYGONFILL_ActiveListInsert()\n");
|
||||||
ASSERT(activehead && NewEdge);
|
ASSERT(activehead && NewEdge);
|
||||||
|
|
||||||
if (!*activehead)
|
if (!*activehead)
|
||||||
{
|
{
|
||||||
NewEdge->pNext = NULL;
|
NewEdge->pNext = NULL;
|
||||||
|
@ -204,6 +208,7 @@ POLYGONFILL_ActiveListInsert(FILL_EDGE** activehead, FILL_EDGE* NewEdge )
|
||||||
*activehead = NewEdge;
|
*activehead = NewEdge;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Ok, now scan to the next spot to put this item.
|
** Ok, now scan to the next spot to put this item.
|
||||||
*/
|
*/
|
||||||
|
@ -352,7 +357,10 @@ POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline)
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
APIENTRY
|
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;
|
int i;
|
||||||
|
|
||||||
|
@ -463,11 +471,10 @@ POLYGONFILL_FillScanLineWinding(
|
||||||
if ( winding )
|
if ( winding )
|
||||||
{
|
{
|
||||||
// Check and see if this new line touches the previous...
|
// Check and see if this new line touches the previous...
|
||||||
if ( (newx1 >= x1 && newx1 <= x2)
|
if ((newx1 >= x1 && newx1 <= x2) ||
|
||||||
|| (newx2 >= x1 && newx2 <= x2)
|
(newx2 >= x1 && newx2 <= x2) ||
|
||||||
|| (x1 >= newx1 && x1 <= newx2)
|
(x1 >= newx1 && x1 <= newx2) ||
|
||||||
|| (x2 >= newx2 && x2 <= newx2)
|
(x2 >= newx2 && x2 <= newx2))
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Yup, just tack it on to our existing line
|
// Yup, just tack it on to our existing line
|
||||||
x1 = min(x1,newx1);
|
x1 = min(x1,newx1);
|
||||||
|
@ -494,10 +501,12 @@ POLYGONFILL_FillScanLineWinding(
|
||||||
x2 = newx2;
|
x2 = newx2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pLeft = pRight;
|
pLeft = pRight;
|
||||||
pRight = pLeft->pNext;
|
pRight = pLeft->pNext;
|
||||||
winding += pLeft->YDirection;
|
winding += pLeft->YDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
// There will always be a line left-over, render it now...
|
// There will always be a line left-over, render it now...
|
||||||
BoundRect.left = x1;
|
BoundRect.left = x1;
|
||||||
BoundRect.right = x2;
|
BoundRect.right = x2;
|
||||||
|
@ -616,6 +625,7 @@ IntFillPolygon(
|
||||||
{
|
{
|
||||||
int x1 = pLeft->XIntercept[0];
|
int x1 = pLeft->XIntercept[0];
|
||||||
int x2 = pRight->XIntercept[1];
|
int x2 = pRight->XIntercept[1];
|
||||||
|
|
||||||
if (x2 > x1)
|
if (x2 > x1)
|
||||||
{
|
{
|
||||||
RECTL LineRect;
|
RECTL LineRect;
|
||||||
|
@ -636,6 +646,7 @@ IntFillPolygon(
|
||||||
BrushOrigin,
|
BrushOrigin,
|
||||||
ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY));
|
ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY));
|
||||||
}
|
}
|
||||||
|
|
||||||
pLeft = pRight->pNext;
|
pLeft = pRight->pNext;
|
||||||
pRight = pLeft ? pLeft->pNext : NULL;
|
pRight = pLeft ? pLeft->pNext : NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue