#include <win32k.h>
#include <debug.h>
Go to the source code of this file.
|
static void FASTCALL | POLYGONFILL_DestroyEdgeList (FILL_EDGE_LIST *list) |
|
static FILL_EDGE *FASTCALL | POLYGONFILL_MakeEdge (POINT From, POINT To) |
|
static INT FASTCALL | FILL_EDGE_Compare (FILL_EDGE *Edge1, FILL_EDGE *Edge2) |
|
static void FASTCALL | POLYGONFILL_ActiveListInsert (FILL_EDGE **activehead, FILL_EDGE *NewEdge) |
|
static FILL_EDGE_LIST *FASTCALL | POLYGONFILL_MakeEdgeList (PPOINT Points, int Count) |
|
static void FASTCALL | POLYGONFILL_UpdateScanline (FILL_EDGE *pEdge, int Scanline) |
|
static void APIENTRY | POLYGONFILL_BuildActiveList (int Scanline, FILL_EDGE_LIST *list, FILL_EDGE **ActiveHead) |
|
static void APIENTRY | POLYGONFILL_FillScanLineAlternate (PDC dc, int ScanLine, FILL_EDGE *ActiveHead, SURFACE *psurf, BRUSHOBJ *BrushObj, MIX RopMode) |
|
static void APIENTRY | POLYGONFILL_FillScanLineWinding (PDC dc, int ScanLine, FILL_EDGE *ActiveHead, SURFACE *psurf, BRUSHOBJ *BrushObj, MIX RopMode) |
|
BOOL APIENTRY | FillPolygon (PDC dc, SURFACE *psurf, BRUSHOBJ *BrushObj, MIX RopMode, CONST PPOINT Points, int Count, RECTL BoundRect) |
|
BOOL FASTCALL | IntFillPolygon (PDC dc, SURFACE *psurf, BRUSHOBJ *BrushObj, CONST PPOINT Points, int Count, RECTL DestRect, POINTL *BrushOrigin) |
|
◆ DEBUG_PRINT_ACTIVE_EDGELIST
#define DEBUG_PRINT_ACTIVE_EDGELIST |
( |
|
x | ) |
|
◆ FILL_EDGE_ALLOC_TAG
#define FILL_EDGE_ALLOC_TAG 0x45465044 |
◆ NDEBUG
◆ FILL_EDGE
◆ FILL_EDGE_LIST
◆ FILL_EDGE_Compare()
◆ FillPolygon()
Definition at line 538 of file polyfill.c.
546{
549 int ScanLine;
554 int ScanLine,
559
560
561
562
564
567
570 else
572
573
574
575
576 for (ScanLine = BoundRect.
top; ScanLine < BoundRect.
bottom; ++ScanLine)
577 {
579
580 FillScanLine(
dc, ScanLine, ActiveHead, psurf, BrushObj, RopMode);
581 }
582
583
585
587}
static void APIENTRY POLYGONFILL_FillScanLineAlternate(PDC dc, int ScanLine, FILL_EDGE *ActiveHead, SURFACE *psurf, BRUSHOBJ *BrushObj, MIX RopMode)
static void APIENTRY POLYGONFILL_FillScanLineWinding(PDC dc, int ScanLine, FILL_EDGE *ActiveHead, SURFACE *psurf, BRUSHOBJ *BrushObj, MIX RopMode)
static FILL_EDGE_LIST *FASTCALL POLYGONFILL_MakeEdgeList(PPOINT Points, int Count)
static void FASTCALL POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST *list)
static void APIENTRY POLYGONFILL_BuildActiveList(int Scanline, FILL_EDGE_LIST *list, FILL_EDGE **ActiveHead)
◆ IntFillPolygon()
Definition at line 590 of file polyfill.c.
598{
602 int ScanLine;
603
604
605
606
608
611
612
613 for (ScanLine = DestRect.
top; ScanLine < DestRect.
bottom; ++ScanLine)
614 {
616
617
618 if (!ActiveHead)
619 {
622 }
623
624 pLeft = ActiveHead;
625 pRight = pLeft->
pNext;
627
628 while (
NULL != pRight)
629 {
632
634 {
636 LineRect.
top = ScanLine;
637 LineRect.
bottom = ScanLine + 1;
640
646 &LineRect,
649 BrushObj,
650 BrushOrigin,
652 }
653
654 pLeft = pRight->
pNext;
656 }
657 }
658
659
661
663}
#define ROP4_FROM_INDEX(index)
struct _tagFILL_EDGE * pNext
BOOL APIENTRY IntEngBitBlt(SURFOBJ *psoTrg, SURFOBJ *psoSrc, SURFOBJ *psoMask, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc, POINTL *pptlMask, BRUSHOBJ *pbo, POINTL *pptlBrush, ROP4 Rop4)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Referenced by IntEngFillPolygon(), and IntGdiPolygon().
◆ POLYGONFILL_ActiveListInsert()
Definition at line 191 of file polyfill.c.
192{
194
195 ASSERT(activehead && NewEdge);
196
197 if (!*activehead)
198 {
200 *activehead = NewEdge;
201 return;
202 }
203
204
205
207 {
208 NewEdge->
pNext = *activehead;
209 *activehead = NewEdge;
210 return;
211 }
212
213
214
215
216 pThis = *activehead;
219 {
220 pPrev = pThis;
221 pThis = pThis->
pNext;
222 }
223
226 pPrev->
pNext = NewEdge;
227
228}
static INT FASTCALL FILL_EDGE_Compare(FILL_EDGE *Edge1, FILL_EDGE *Edge2)
Referenced by POLYGONFILL_BuildActiveList().
◆ POLYGONFILL_BuildActiveList()
Definition at line 361 of file polyfill.c.
365{
367
369 *ActiveHead = 0;
370 for (
i = 0;
i <
list->Count;
i++)
371 {
374 if (pEdge->
FromY <= Scanline && pEdge->
ToY > Scanline)
375 {
378 }
379 }
380}
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 void FASTCALL POLYGONFILL_ActiveListInsert(FILL_EDGE **activehead, FILL_EDGE *NewEdge)
static void FASTCALL POLYGONFILL_UpdateScanline(FILL_EDGE *pEdge, int Scanline)
Referenced by FillPolygon(), and IntFillPolygon().
◆ POLYGONFILL_DestroyEdgeList()
◆ POLYGONFILL_FillScanLineAlternate()
Definition at line 389 of file polyfill.c.
396{
398
399 if (!ActiveHead)
400 return;
401
402 pLeft = ActiveHead;
403 pRight = pLeft->
pNext;
405
406 while (
NULL != pRight)
407 {
411 {
413 BoundRect.
top = ScanLine;
414 BoundRect.
bottom = ScanLine + 1;
417
418
421 BrushObj,
423 ScanLine,
425 ScanLine,
426 &BoundRect,
427 RopMode);
428 }
429 pLeft = pRight->
pNext;
431 }
432}
void IntEngLineTo(SURFOBJ *, CLIPOBJ, PBRUSHOBJ, int x1, int y1, int x2, int y2, RECTL *, MIX mix)
Referenced by FillPolygon().
◆ POLYGONFILL_FillScanLineWinding()
Definition at line 437 of file polyfill.c.
444{
446 int x1,
x2, winding = 0;
448
449 if (!ActiveHead)
450 return;
451
452 BoundRect.
top = ScanLine;
453 BoundRect.
bottom = ScanLine + 1;
454
455 pLeft = ActiveHead;
457 pRight = pLeft->
pNext;
459
460
463
464 pLeft = pRight;
465 pRight = pLeft->
pNext;
467
468 while (
NULL != pRight )
469 {
472 if ( winding )
473 {
474
475 if ((newx1 >=
x1 && newx1 <=
x2) ||
476 (newx2 >=
x1 && newx2 <=
x2) ||
477 (
x1 >= newx1 &&
x1 <= newx2) ||
478 (
x2 >= newx2 &&
x2 <= newx2))
479 {
480
483 }
484 else
485 {
486
489
490
493 BrushObj,
495 ScanLine,
497 ScanLine,
498 &BoundRect,
499 RopMode);
500
503 }
504 }
505
506 pLeft = pRight;
507 pRight = pLeft->
pNext;
509 }
510
511
514
515
518 BrushObj,
520 ScanLine,
522 ScanLine,
523 &BoundRect,
524 RopMode);
525}
Referenced by FillPolygon().
◆ POLYGONFILL_MakeEdge()
Definition at line 105 of file polyfill.c.
106{
108
109 if (0 == rc)
111
112
113
115 {
121
122
123
125 }
126 else
127 {
133
135 }
136
143
145
147
149
151
153
154
155
156
157 return rc;
158}
#define FILL_EDGE_ALLOC_TAG
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Referenced by POLYGONFILL_MakeEdgeList().
◆ POLYGONFILL_MakeEdgeList()
Definition at line 236 of file polyfill.c.
237{
238 int CurPt = 0;
241
242 if (0 == Points || 2 >
Count)
243 return 0;
244
247 goto fail;
251 goto fail;
252
254
255 for (CurPt = 1; CurPt <
Count; ++CurPt)
256 {
259 goto fail;
260
261
264 else
266 }
269 goto fail;
270
273 else
276
277fail:
278
281 return 0;
282}
static FILL_EDGE *FASTCALL POLYGONFILL_MakeEdge(POINT From, POINT To)
Referenced by FillPolygon(), and IntFillPolygon().
◆ POLYGONFILL_UpdateScanline()
Definition at line 294 of file polyfill.c.
295{
297 return;
298
300
302 {
304
306
307
310 {
311
318 }
319 else
320 {
323 }
324
325
330
331
334 }
335 else
336 {
339
342
344 {
348 }
349 }
350
351
352
353}
static DWORD DWORD DWORD DWORD * steps
Referenced by POLYGONFILL_BuildActiveList().