ReactOS  0.4.14-dev-991-g696cdc6
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 }
#define TRUE
Definition: types.h:120
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
static FILL_EDGE_LIST *FASTCALL POLYGONFILL_MakeEdgeList(PPOINT Points, int Count)
Definition: polyfill.c:236
long bottom
Definition: polytest.cpp:53
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
static void APIENTRY POLYGONFILL_BuildActiveList(int Scanline, FILL_EDGE_LIST *list, FILL_EDGE **ActiveHead)
Definition: polyfill.c:361
int XIntercept[2]
Definition: polytest.cpp:186
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
SURFOBJ SurfObj
Definition: surface.h:8
smooth NULL
Definition: ftsmooth.c:416
long left
Definition: polytest.cpp:53
static void FASTCALL POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST *list)
Definition: polyfill.c:77
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Definition: _list.h:228
struct _tagFILL_EDGE * pNext
Definition: polytest.cpp:192
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
static const WCHAR dc[]
#define ROP4_FROM_INDEX(index)
Definition: inteng.h:42
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:604

Referenced by IntGdiPolygon().

◆ IntPolygon()

BOOL FASTCALL IntPolygon ( HDC  ,
POINT ,
int   
)

Definition at line 166 of file fillshap.c.

167 {
168  BOOL bResult;
169  PDC pdc;
170 
171  pdc = DC_LockDc(hdc);
172  if (pdc == NULL)
173  {
175  return FALSE;
176  }
177 
178  bResult = IntGdiPolygon(pdc, Point, Count);
179 
180  DC_UnlockDc(pdc);
181  return bResult;
182 }
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
BOOL FASTCALL IntGdiPolygon(PDC dc, PPOINT Points, int Count)
Definition: fillshap.c:18
Definition: polytest.cpp:40
HDC hdc
Definition: main.c:9
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by IntDrawDiagEdge().