ReactOS 0.4.15-dev-7907-g95bf896
paint.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL APIENTRY FillSolid (SURFOBJ *Surface, RECTL *Dimensions, ULONG iColor)
 
BOOL APIENTRY FillPolygon (DC *dc, SURFACE *pSurface, 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)
 
BOOL FASTCALL IntPolygon (HDC, POINT *, int)
 

Function Documentation

◆ FillPolygon()

BOOL APIENTRY FillPolygon ( DC dc,
SURFACE pSurface,
BRUSHOBJ BrushObj,
MIX  RopMode,
CONST PPOINT  Points,
INT  Count,
RECTL  BoundRect 
)

◆ FillSolid()

BOOL APIENTRY FillSolid ( SURFOBJ Surface,
RECTL Dimensions,
ULONG  iColor 
)

◆ IntFillPolygon()

BOOL FASTCALL IntFillPolygon ( PDC  dc,
SURFACE psurf,
BRUSHOBJ BrushObj,
CONST PPOINT  Points,
int  Count,
RECTL  DestRect,
POINTL BrushOrigin 
)

Definition at line 590 of file polyfill.c.

598{
599 FILL_EDGE_LIST *list = 0;
600 FILL_EDGE *ActiveHead = 0;
601 FILL_EDGE *pLeft, *pRight;
602 int ScanLine;
603
604 //DPRINT("IntFillPolygon\n");
605
606 /* Create Edge List. */
608 /* DEBUG_PRINT_EDGELIST(list); */
609 if (NULL == list)
610 return FALSE;
611
612 /* For each Scanline from DestRect.top to DestRect.bottom, determine line segments to draw */
613 for (ScanLine = DestRect.top; ScanLine < DestRect.bottom; ++ScanLine)
614 {
615 POLYGONFILL_BuildActiveList(ScanLine, list, &ActiveHead);
616 //DEBUG_PRINT_ACTIVE_EDGELIST(ActiveHead);
617
618 if (!ActiveHead)
619 {
621 return FALSE;
622 }
623
624 pLeft = ActiveHead;
625 pRight = pLeft->pNext;
626 ASSERT(pRight);
627
628 while (NULL != pRight)
629 {
630 int x1 = pLeft->XIntercept[0];
631 int x2 = pRight->XIntercept[1];
632
633 if (x2 > x1)
634 {
635 RECTL LineRect;
636 LineRect.top = ScanLine;
637 LineRect.bottom = ScanLine + 1;
638 LineRect.left = x1;
639 LineRect.right = x2;
640
641 IntEngBitBlt(&psurf->SurfObj,
642 NULL,
643 NULL,
644 (CLIPOBJ *)&dc->co,
645 NULL,
646 &LineRect,
647 NULL,
648 NULL,
649 BrushObj,
650 BrushOrigin,
652 }
653
654 pLeft = pRight->pNext;
655 pRight = pLeft ? pLeft->pNext : NULL;
656 }
657 }
658
659 /* Free Edge List. If any are left. */
661
662 return TRUE;
663}
Definition: list.h:37
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ROP4_FROM_INDEX(index)
Definition: inteng.h:42
@ R3_OPINDEX_PATCOPY
Definition: inteng.h:35
static const WCHAR dc[]
#define ASSERT(a)
Definition: mode.c:44
int Count
Definition: noreturn.cpp:7
static FILL_EDGE_LIST *FASTCALL POLYGONFILL_MakeEdgeList(PPOINT Points, int Count)
Definition: polyfill.c:236
static void FASTCALL POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST *list)
Definition: polyfill.c:77
static void APIENTRY POLYGONFILL_BuildActiveList(int Scanline, FILL_EDGE_LIST *list, FILL_EDGE **ActiveHead)
Definition: polyfill.c:361
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
SURFOBJ SurfObj
Definition: surface.h:8
struct _tagFILL_EDGE * pNext
Definition: polytest.cpp:192
int XIntercept[2]
Definition: polytest.cpp:186
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)
Definition: bitblt.c:656
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708

Referenced by IntEngFillPolygon(), and IntGdiPolygon().

◆ IntPolygon()

BOOL FASTCALL IntPolygon ( HDC  hdc,
POINT Point,
int  Count 
)

Definition at line 199 of file fillshap.c.

200{
201 BOOL bResult;
202 PDC pdc;
203
204 pdc = DC_LockDc(hdc);
205 if (pdc == NULL)
206 {
208 return FALSE;
209 }
210
211 bResult = IntGdiPolygon(pdc, Point, Count);
212
213 DC_UnlockDc(pdc);
214 return bResult;
215}
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL FASTCALL IntGdiPolygon(PDC dc, PPOINT Points, int Count)
Definition: fillshap.c:18
HDC hdc
Definition: main.c:9
Definition: polytest.cpp:41
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22

Referenced by IntDrawDiagEdge().