29 #define MmCopyFromCaller memmove 56 #define EngFreeMem free 58 #define FL_ZERO_MEMORY 1 60 #define DPRINT1 printf("%i:",__LINE__);printf 93 return t < 0 ? -
t :
t;
119 int EMax =
MAX(absdx,absdy);
121 int xinc =
dx < 0 ? -1 : 1,
122 yinc =
dy < 0 ? -1 : 1;
141 for (
int i = 0;
i < EMax;
i++ )
167 #define FILL_EDGE_ALLOC_TAG 0x45465044 217 pThis = pThis->
pNext;
221 #define DEBUG_PRINT_ACTIVE_EDGELIST(x) 237 for (
i = 0;
i <
list->Count;
i++ )
239 if (
list->Edges[
i] )
303 DPRINT(
"MakeEdge (%i,%i)->(%i,%i) d=(%i,%i) dir=(%i,%i) err=%i max=%i\n",
344 ASSERT ( activehead && NewEdge );
348 *activehead = NewEdge;
356 NewEdge->
pNext = *activehead;
357 *activehead = NewEdge;
368 pThis = pThis->
pNext;
373 pPrev->
pNext = NewEdge;
389 if ( 0 == Points || 2 >
Count )
401 for ( CurPt = 1; CurPt <
Count; ++CurPt )
439 if ( 0 == pEdge->
dy )
448 ASSERT ( pEdge->
y == Scanline );
494 DPRINT(
"Line (%d, %d) to (%d, %d) intersects scanline %d at (%d,%d)\n",
509 for (
i = 0;
i <
list->Count;
i++ )
513 if ( pEdge->
FromY <= Scanline && pEdge->
ToY > Scanline )
541 pRight = pLeft->
pNext;
544 while (
NULL != pRight )
551 BoundRect.
top = ScanLine;
552 BoundRect.
bottom = ScanLine + 1;
556 DPRINT(
"Fill Line (%d, %d) to (%d, %d)\n",
x1, ScanLine,
x2, ScanLine);
567 pLeft = pRight->
pNext;
583 int x1,
x2, winding = 0;
589 BoundRect.
top = ScanLine;
590 BoundRect.
bottom = ScanLine + 1;
594 pRight = pLeft->
pNext;
602 pRight = pLeft->
pNext;
605 while (
NULL != pRight )
612 if ( (newx1 >=
x1 && newx1 <=
x2)
613 || (newx2 >=
x1 && newx2 <=
x2)
614 || (
x1 >= newx1 &&
x1 <= newx2)
615 || (
x2 >= newx2 &&
x2 <= newx2)
628 DPRINT(
"Fill Line (%d, %d) to (%d, %d)\n",
x1, ScanLine,
x2, ScanLine);
644 pRight = pLeft->
pNext;
651 DPRINT(
"Fill Line (%d, %d) to (%d, %d)\n",
x1, ScanLine,
x2, ScanLine);
711 for ( ScanLine = BoundRect.
top; ScanLine < BoundRect.
bottom; ++ScanLine )
715 FillScanLine (
dc, ScanLine, ActiveHead, SurfObj, BrushObj, RopMode );
741 dc.w.polyFillMode = polyFillMode;
747 DPRINT1(
"ERROR_INVALID_PARAMETER\n");
755 DPRINT1(
"ERROR_NOT_ENOUGH_MEMORY\n");
765 DestRect.
left = Points[0].
x;
766 DestRect.
right = Points[0].
x;
767 DestRect.
top = Points[0].
y;
770 for (CurrentPoint = 1; CurrentPoint <
Count; ++CurrentPoint)
772 DestRect.
left =
MIN(DestRect.
left, Points[CurrentPoint].
x);
774 DestRect.
top =
MIN(DestRect.
top, Points[CurrentPoint].
y);
779 for (CurrentPoint = 0; CurrentPoint <
Count; ++CurrentPoint)
787 From = Points[CurrentPoint];
788 if ( CurrentPoint + 1 >=
Count)
794 To = Points[CurrentPoint + 1];
797 DPRINT1(
"Polygon Making line from (%ld,%ld) to (%ld,%ld)\n", From.
x, From.
y, To.
x, To.
y );
851 const int pts_count =
sizeof(pts)/
sizeof(pts[0]);
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
struct tagPOINT * LPPOINT
static void FASTCALL POLYGONFILL_ActiveListInsert(FILL_EDGE **activehead, FILL_EDGE *NewEdge)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
BOOL FillPolygon(PDC dc, SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode, CONST PPOINT Points, int Count, RECTL BoundRect)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static FILL_EDGE_LIST *FASTCALL POLYGONFILL_MakeEdgeList(PPOINT Points, int Count)
static void POLYGONFILL_FillScanLineWinding(PDC dc, int ScanLine, FILL_EDGE *ActiveHead, SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode)
struct _tagFILL_EDGE FILL_EDGE
static DWORD DWORD DWORD DWORD * steps
GLboolean GLboolean GLboolean b
static void FASTCALL POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST *list)
static void FASTCALL POLYGONFILL_UpdateScanline(FILL_EDGE *pEdge, int Scanline)
void IntEngLineTo(SURFOBJ *, CLIPOBJ, PBRUSHOBJ, int x1, int y1, int x2, int y2, RECTL *, MIX mix)
void * EngAllocMem(int zero, unsigned long size, int tag=0)
#define FILL_EDGE_ALLOC_TAG
struct _FILL_EDGE_LIST FILL_EDGE_LIST
static FILL_EDGE *FASTCALL POLYGONFILL_MakeEdge(POINT From, POINT To)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
char screen[SCREENY][SCREENX]
static void POLYGONFILL_FillScanLineAlternate(PDC dc, int ScanLine, FILL_EDGE *ActiveHead, SURFOBJ *SurfObj, PBRUSHOBJ BrushObj, MIX RopMode)
struct _tagFILL_EDGE * pNext
static INT FASTCALL FILL_EDGE_Compare(FILL_EDGE *Edge1, FILL_EDGE *Edge2)
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX mix
#define DEBUG_PRINT_ACTIVE_EDGELIST(x)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
void putpixel(int x, int y, char c)
static void POLYGONFILL_BuildActiveList(int Scanline, FILL_EDGE_LIST *list, FILL_EDGE **ActiveHead)
GLboolean GLboolean GLboolean GLboolean a