ReactOS  0.4.14-dev-98-gb0d4763
intgdi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_ROP3_TO_ENG_ROP4(dwRop4)   ((((dwRop4) & 0x00FF0000) >> 16) | (((dwRop4) & 0x00FF0000) >> 8))
 
#define WIN32_ROP4_TO_ENG_ROP4(dwRop4)   ((dwRop4) >> 16)
 
#define WIN32_ROP4_USES_SOURCE(Rop)   ((((Rop) & 0xCCCC0000) >> 2) != ((Rop) & 0x33330000))
 
#define FIXUP_ROP2(rop2)   ((((rop2) - 1) & 0xF) + 1)
 

Functions

BOOL FASTCALL IntGdiLineTo (DC *dc, int XEnd, int YEnd)
 
BOOL FASTCALL IntGdiMoveToEx (DC *dc, int X, int Y, LPPOINT Point)
 
BOOL FASTCALL IntGdiPolyBezier (DC *dc, LPPOINT pt, DWORD Count)
 
BOOL FASTCALL IntGdiPolyline (DC *dc, LPPOINT pt, int Count)
 
BOOL FASTCALL IntGdiPolyBezierTo (DC *dc, LPPOINT pt, DWORD Count)
 
BOOL FASTCALL IntGdiPolyPolyline (DC *dc, LPPOINT pt, PULONG PolyPoints, DWORD Count)
 
BOOL FASTCALL IntGdiPolylineTo (DC *dc, LPPOINT pt, DWORD Count)
 
BOOL FASTCALL GreMoveTo (HDC hdc, INT x, INT y, LPPOINT pptOut)
 
BOOL NTAPI GreGradientFill (HDC hdc, PTRIVERTEX pVertex, ULONG nVertex, PVOID pMesh, ULONG nMesh, ULONG ulMode)
 
HDC FASTCALL IntGdiCreateDC (PUNICODE_STRING Driver, PUNICODE_STRING Device, PVOID pUMdhpdev, CONST PDEVMODEW InitData, BOOL CreateAsIC)
 
VOID FASTCALL IntSetSysColors (UINT nColors, CONST INT *Elements, CONST COLORREF *Colors)
 
HGDIOBJ FASTCALL IntGetSysColorBrush (INT Object)
 
DWORD FASTCALL IntGetSysColor (INT nIndex)
 
NTSTATUS APIENTRY NtGdiFlushUserBatch (VOID)
 
DWORD APIENTRY NtDxEngGetRedirectionBitmap (DWORD Unknown0)
 
HBITMAP FASTCALL IntCreateCompatibleBitmap (_In_ PDC Dc, _In_ INT Width, _In_ INT Height, _In_ UINT Bpp, _In_ UINT Planes)
 
WORD APIENTRY IntGdiSetHookFlags (HDC hDC, WORD Flags)
 
UINT APIENTRY IntSetDIBColorTable (HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Colors)
 
UINT APIENTRY IntGetDIBColorTable (HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
 
UINT APIENTRY IntGetPaletteEntries (HPALETTE hpal, UINT StartIndex, UINT Entries, LPPALETTEENTRY pe)
 
UINT APIENTRY IntGetSystemPaletteEntries (HDC hDC, UINT StartIndex, UINT Entries, LPPALETTEENTRY pe)
 
VOID FASTCALL CreateStockObjects (VOID)
 
VOID FASTCALL CreateSysColorObjects (VOID)
 
PPOINT GDI_Bezier (const POINT *Points, INT count, PINT nPtsOut)
 
BOOL FASTCALL IntFillArc (PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, double StartArc, double EndArc, ARCTYPE arctype)
 
BOOL FASTCALL IntDrawArc (PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, double StartArc, double EndArc, ARCTYPE arctype, PBRUSH pbrush)
 
BOOL FASTCALL IntFillEllipse (PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, PBRUSH pbrush)
 
BOOL FASTCALL IntDrawEllipse (PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, PBRUSH pbrush)
 
BOOL FASTCALL IntFillRoundRect (PDC dc, INT Left, INT Top, INT Right, INT Bottom, INT Wellipse, INT Hellipse, PBRUSH pbrush)
 
BOOL FASTCALL IntDrawRoundRect (PDC dc, INT Left, INT Top, INT Right, INT Bottom, INT Wellipse, INT Hellipse, PBRUSH pbrush)
 

Variables

HDC hSystemBM
 
HSEMAPHORE hsemDriverMgmt
 

Macro Definition Documentation

◆ FIXUP_ROP2

#define FIXUP_ROP2 (   rop2)    ((((rop2) - 1) & 0xF) + 1)

Definition at line 10 of file intgdi.h.

◆ WIN32_ROP3_TO_ENG_ROP4

#define WIN32_ROP3_TO_ENG_ROP4 (   dwRop4)    ((((dwRop4) & 0x00FF0000) >> 16) | (((dwRop4) & 0x00FF0000) >> 8))

Definition at line 4 of file intgdi.h.

◆ WIN32_ROP4_TO_ENG_ROP4

#define WIN32_ROP4_TO_ENG_ROP4 (   dwRop4)    ((dwRop4) >> 16)

Definition at line 5 of file intgdi.h.

◆ WIN32_ROP4_USES_SOURCE

#define WIN32_ROP4_USES_SOURCE (   Rop)    ((((Rop) & 0xCCCC0000) >> 2) != ((Rop) & 0x33330000))

Definition at line 7 of file intgdi.h.

Function Documentation

◆ CreateStockObjects()

VOID FASTCALL CreateStockObjects ( void  )

Creates a bunch of stock objects: brushes, pens, fonts.

Definition at line 247 of file stockobj.c.

248 {
249  UINT Object;
250 
251  DPRINT("Beginning creation of stock objects\n");
252 
253  /* Create GDI Stock Objects from the logical structures we've defined */
254 
256  StockObjects[DC_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
262 
267 
268  StockObjects[20] = NULL; /* TODO: Unknown internal stock object */
270 
272 
274 
276  {
277  if (NULL != StockObjects[Object])
278  {
280  }
281  }
282 
283  DPRINT("Completed creation of stock objects\n");
284 }
static LOGPEN BlackPen
Definition: stockobj.c:59
HBRUSH APIENTRY IntGdiCreateSolidBrush(COLORREF crColor)
Definition: brush.cpp:279
#define NB_STOCK_OBJECTS
Definition: ntgdityp.h:191
long x
Definition: polytest.cpp:48
#define WHITE_PEN
Definition: wingdi.h:904
#define NULL_BRUSH
Definition: wingdi.h:900
POINT lopnWidth
Definition: wingdi.h:1841
#define WHITE_BRUSH
Definition: wingdi.h:901
static VOID FASTCALL CreateStockFonts(void)
Definition: stockobj.c:145
HGDIOBJ StockObjects[NB_STOCK_OBJECTS]
Definition: stockobj.c:100
PALETTE * gppalDefault
Definition: palette.c:20
static LOGPEN NullPen
Definition: stockobj.c:62
BOOL NTAPI GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
Definition: gdiobj.c:1452
UINT lopnStyle
Definition: wingdi.h:1840
#define NULL_PEN
Definition: wingdi.h:903
HGDIOBJ hHmgr(VOID)
Definition: baseobj.hpp:95
COLORREF lopnColor
Definition: wingdi.h:1842
smooth NULL
Definition: ftsmooth.c:416
#define LTGRAY_BRUSH
Definition: wingdi.h:899
void DPRINT(...)
Definition: polytest.cpp:61
#define GRAY_BRUSH
Definition: wingdi.h:897
#define DEFAULT_BITMAP
Definition: ntgdityp.h:194
#define BLACK_BRUSH
Definition: wingdi.h:895
#define DEFAULT_PALETTE
Definition: wingdi.h:912
static HPEN FASTCALL IntCreateStockPen(DWORD dwPenStyle, DWORD dwWidth, ULONG ulBrushStyle, ULONG ulColor)
Definition: stockobj.c:105
#define RGB(r, g, b)
Definition: wingdi.h:2935
#define for
Definition: utility.h:88
static IUnknown Object
Definition: main.c:512
static LOGPEN WhitePen
Definition: stockobj.c:56
#define DKGRAY_BRUSH
Definition: wingdi.h:896
BASEOBJECT BaseObject
Definition: palette.h:36
void * HGDIOBJ
Definition: windef.h:252
#define BLACK_PEN
Definition: wingdi.h:902
unsigned int UINT
Definition: ndis.h:50
#define BS_SOLID
Definition: wingdi.h:1085
HBRUSH NTAPI IntGdiCreateNullBrush(VOID)
Definition: brush.cpp:270
HBITMAP NTAPI GreCreateBitmap(_In_ ULONG nWidth, _In_ ULONG nHeight, _In_ ULONG cPlanes, _In_ ULONG cBitsPixel, _In_opt_ PVOID pvBits)
Definition: bitmaps.c:172

Referenced by DriverEntry().

◆ CreateSysColorObjects()

VOID FASTCALL CreateSysColorObjects ( VOID  )

Definition at line 329 of file stockobj.c.

330 {
331  UINT i;
332 
333  for (i = 0; i < NUM_SYSCOLORS; i++)
334  {
335  gpsi->argbSystem[i] = SysColors[i];
336  }
337 
338  /* Create the syscolor brushes */
339  for (i = 0; i < NUM_SYSCOLORS; i++)
340  {
341  if (gpsi->ahbrSystem[i] == NULL)
342  {
343  gpsi->ahbrSystem[i] = IntGdiCreateSolidBrush(SysColors[i]);
344  if (gpsi->ahbrSystem[i] != NULL)
345  {
346  GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->ahbrSystem[i]);
347  }
348  }
349  }
350 }
HBRUSH APIENTRY IntGdiCreateSolidBrush(COLORREF crColor)
Definition: brush.cpp:279
PSERVERINFO gpsi
Definition: main.c:27
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
Definition: glfuncs.h:248
BOOL NTAPI GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
Definition: gdiobj.c:1452
smooth NULL
Definition: ftsmooth.c:416
static const COLORREF SysColors[]
Definition: stockobj.c:16
#define NUM_SYSCOLORS
Definition: SetSysColors.c:10
unsigned int UINT
Definition: ndis.h:50

Referenced by DriverEntry().

◆ GDI_Bezier()

PPOINT GDI_Bezier ( const POINT Points,
INT  count,
PINT  nPtsOut 
)

◆ GreGradientFill()

BOOL NTAPI GreGradientFill ( HDC  hdc,
PTRIVERTEX  pVertex,
ULONG  nVertex,
PVOID  pMesh,
ULONG  nMesh,
ULONG  ulMode 
)

Definition at line 871 of file fillshap.c.

878 {
879  PDC pdc;
880  SURFACE *psurf;
881  EXLATEOBJ exlo;
882  RECTL rclExtent;
883  POINTL ptlDitherOrg;
884  ULONG i;
885  BOOL bRet;
886 
887  /* Check parameters */
888  if (ulMode & GRADIENT_FILL_TRIANGLE)
889  {
891 
892  for (i = 0; i < nMesh; i++, pTriangle++)
893  {
894  if (pTriangle->Vertex1 >= nVertex ||
895  pTriangle->Vertex2 >= nVertex ||
896  pTriangle->Vertex3 >= nVertex)
897  {
899  return FALSE;
900  }
901  }
902  }
903  else
904  {
906  for (i = 0; i < nMesh; i++, pRect++)
907  {
908  if (pRect->UpperLeft >= nVertex || pRect->LowerRight >= nVertex)
909  {
911  return FALSE;
912  }
913  }
914  }
915 
916  /* Lock the output DC */
917  pdc = DC_LockDc(hdc);
918  if(!pdc)
919  {
921  return FALSE;
922  }
923 
924  if (!pdc->dclevel.pSurface)
925  {
926  /* Memory DC with no surface selected */
927  DC_UnlockDc(pdc);
928  return TRUE; // CHECKME
929  }
930 
931  /* Calculate extent */
932  rclExtent.left = rclExtent.right = pVertex->x;
933  rclExtent.top = rclExtent.bottom = pVertex->y;
934  for (i = 0; i < nVertex; i++)
935  {
936  rclExtent.left = min(rclExtent.left, (pVertex + i)->x);
937  rclExtent.right = max(rclExtent.right, (pVertex + i)->x);
938  rclExtent.top = min(rclExtent.top, (pVertex + i)->y);
939  rclExtent.bottom = max(rclExtent.bottom, (pVertex + i)->y);
940  }
941  IntLPtoDP(pdc, (LPPOINT)&rclExtent, 2);
942 
943  rclExtent.left += pdc->ptlDCOrig.x;
944  rclExtent.right += pdc->ptlDCOrig.x;
945  rclExtent.top += pdc->ptlDCOrig.y;
946  rclExtent.bottom += pdc->ptlDCOrig.y;
947 
948  if (RECTL_bIsEmptyRect(&rclExtent))
949  {
950  DC_UnlockDc(pdc);
951  return TRUE;
952  }
953 
954  ptlDitherOrg.x = ptlDitherOrg.y = 0;
955  IntLPtoDP(pdc, (LPPOINT)&ptlDitherOrg, 1);
956 
957  ptlDitherOrg.x += pdc->ptlDCOrig.x;
958  ptlDitherOrg.y += pdc->ptlDCOrig.y;
959 
960  if (pdc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR))
961  {
962  IntUpdateBoundsRect(pdc, &rclExtent);
963  }
964 
965  DC_vPrepareDCsForBlit(pdc, &rclExtent, NULL, NULL);
966 
967  psurf = pdc->dclevel.pSurface;
968 
969  EXLATEOBJ_vInitialize(&exlo, &gpalRGB, psurf->ppal, 0, 0, 0);
970 
971  bRet = IntEngGradientFill(&psurf->SurfObj,
972  (CLIPOBJ *)&pdc->co,
973  &exlo.xlo,
974  pVertex,
975  nVertex,
976  pMesh,
977  nMesh,
978  &rclExtent,
979  &ptlDitherOrg,
980  ulMode);
981 
982  EXLATEOBJ_vCleanup(&exlo);
983  DC_vFinishBlit(pdc, NULL);
984  DC_UnlockDc(pdc);
985 
986  return bRet;
987 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG nMesh
Definition: winddi.h:3649
ULONG UpperLeft
Definition: wingdi.h:2800
ULONG LowerRight
Definition: wingdi.h:2801
#define max(a, b)
Definition: svc.c:63
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID pMesh
Definition: winddi.h:3649
#define TRUE
Definition: types.h:120
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
struct _PALETTE *const ppal
Definition: surface.h:11
long bottom
Definition: polytest.cpp:53
LONG y
Definition: windef.h:315
XLATEOBJ xlo
Definition: xlateobj.h:21
long right
Definition: polytest.cpp:53
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
Definition: glfuncs.h:248
VOID NTAPI EXLATEOBJ_vInitialize(_Out_ PEXLATEOBJ pexlo, _In_opt_ PALETTE *ppalSrc, _In_opt_ PALETTE *ppalDst, _In_ COLORREF crSrcBackColor, _In_ COLORREF crDstBackColor, _In_ COLORREF crDstForeColor)
Definition: xlateobj.c:358
unsigned int BOOL
Definition: ntddk_ex.h:94
long top
Definition: polytest.cpp:53
SURFOBJ SurfObj
Definition: surface.h:8
struct _GRADIENT_RECT * PGRADIENT_RECT
smooth NULL
Definition: ftsmooth.c:416
BOOL APIENTRY IntEngGradientFill(IN SURFOBJ *psoDest, IN CLIPOBJ *pco, IN XLATEOBJ *pxlo, IN TRIVERTEX *pVertex, IN ULONG nVertex, IN PVOID pMesh, IN ULONG nMesh, IN RECTL *prclExtents, IN POINTL *pptlDitherOrg, IN ULONG ulMode)
Definition: gradient.c:553
VOID NTAPI EXLATEOBJ_vCleanup(_Inout_ PEXLATEOBJ pexlo)
Definition: xlateobj.c:649
long left
Definition: polytest.cpp:53
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX * pVertex
Definition: winddi.h:3649
Definition: polytest.cpp:40
LONG x
Definition: windef.h:314
#define IntLPtoDP(pdc, ppt, count)
Definition: coord.h:7
HDC hdc
Definition: main.c:9
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL _In_ ULONG ulMode
Definition: winddi.h:3649
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
#define min(a, b)
Definition: monoChain.cc:55
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
Definition: dclife.c:505
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
Definition: dclife.c:614
VOID FASTCALL IntUpdateBoundsRect(PDC, PRECTL)
Definition: dcutil.c:689
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
unsigned int ULONG
Definition: retypes.h:1
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG nVertex
Definition: winddi.h:3649
PALETTE gpalRGB
Definition: palette.c:20
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27
struct _GRADIENT_TRIANGLE * PGRADIENT_TRIANGLE

Referenced by NtGdiGradientFill(), and UserDrawCaption().

◆ GreMoveTo()

BOOL FASTCALL GreMoveTo ( HDC  hdc,
INT  x,
INT  y,
LPPOINT  pptOut 
)

Definition at line 108 of file line.c.

112 {
113  BOOL Ret;
114  PDC dc;
115  if (!(dc = DC_LockDc(hdc)))
116  {
118  return FALSE;
119  }
120  Ret = IntGdiMoveToEx(dc, x, y, pptOut);
121  DC_UnlockDc(dc);
122  return Ret;
123 }
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC dc
Definition: cylfrac.c:34
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: polytest.cpp:40
HDC hdc
Definition: main.c:9
_In_ UINT _Out_ PPOINTL pptOut
Definition: ntgdi.h:2197
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL FASTCALL IntGdiMoveToEx(DC *dc, int X, int Y, LPPOINT Point)
Definition: line.c:78
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by IntDrawDiagEdge(), IntDrawMenuBarTemp(), IntDrawRectEdge(), MENU_DrawMenuItem(), NC_DoNCPaint(), TEXT_DrawUnderscore(), and UserDrawCaptionBar().

◆ IntCreateCompatibleBitmap()

HBITMAP FASTCALL IntCreateCompatibleBitmap ( _In_ PDC  Dc,
_In_ INT  Width,
_In_ INT  Height,
_In_ UINT  Bpp,
_In_ UINT  Planes 
)

◆ IntDrawArc()

BOOL FASTCALL IntDrawArc ( PDC  dc,
INT  XLeft,
INT  YLeft,
INT  Width,
INT  Height,
double  StartArc,
double  EndArc,
ARCTYPE  arctype,
PBRUSH  pbrush 
)

Definition at line 1342 of file drawing.c.

1351 {
1352  int Start = (int)ceil(StartArc);
1353  int End = (int)ceil(EndArc);
1354  BOOL Chord = (arctype == GdiTypeChord);
1355  // Sort out alignment here.
1356  return app_draw_arc(dc, rect( XLeft, YLeft, Width, Height),
1357  (dc->dclevel.flPath & DCPATH_CLOCKWISE) ? -End : -Start,
1358  (dc->dclevel.flPath & DCPATH_CLOCKWISE) ? -Start : -End,
1359  pbrush, Chord);
1360 }
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)
BOOL WINAPI Chord(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xRadial1, _In_ INT yRadial1, _In_ INT xRadial2, _In_ INT yRadial2)
Definition: arc.c:119
HDC dc
Definition: cylfrac.c:34
static Rect NTAPI rect(int x, int y, int width, int height)
Definition: drawing.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen, BOOL Chord)
Definition: drawing.c:962
Definition: partlist.h:33
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by IntArc().

◆ IntDrawEllipse()

BOOL FASTCALL IntDrawEllipse ( PDC  dc,
INT  XLeft,
INT  YLeft,
INT  Width,
INT  Height,
PBRUSH  pbrush 
)

Definition at line 1364 of file drawing.c.

1370 {
1371  return (BOOL)app_draw_ellipse(dc, rect( XLeft, YLeft, Width, Height), pbrush);
1372 }
HDC dc
Definition: cylfrac.c:34
static Rect NTAPI rect(int x, int y, int width, int height)
Definition: drawing.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
static int NTAPI app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
Definition: drawing.c:124

Referenced by NtGdiEllipse().

◆ IntDrawRoundRect()

BOOL FASTCALL IntDrawRoundRect ( PDC  dc,
INT  Left,
INT  Top,
INT  Right,
INT  Bottom,
INT  Wellipse,
INT  Hellipse,
PBRUSH  pbrush 
)

Definition at line 1454 of file drawing.c.

1462 {
1463  Rect r;
1464  int rx, ry; /* Radius in x and y directions */
1465  int w = pbrushPen->lWidth;
1466 
1467  r = rect( Left, Top, abs(Right-Left), abs(Bottom-Top));
1468  rx = Wellipse/2;
1469  ry = Hellipse/2;
1470 
1471  if (Wellipse > r.width)
1472  {
1473  if (Hellipse > r.height) // > W > H
1474  app_draw_ellipse(dc, r, pbrushPen);
1475  else // > W < H
1476  {
1477  app_draw_arc(dc, rect( r.x, r.y, r.width - 1, Hellipse - 1),
1478  0, 180, pbrushPen, FALSE);
1479  app_draw_arc(dc, rect(r.x, Bottom - Hellipse, r.width - 1, Hellipse - 1),
1480  180, 360, pbrushPen, FALSE);
1481  }
1482  }
1483  else if(Hellipse > r.height) // < W > H
1484  {
1485  app_draw_arc(dc, rect(r.x, r.y, Wellipse - 1, r.height - 1),
1486  90, 270, pbrushPen, FALSE);
1487  app_draw_arc(dc, rect(Right - Wellipse, r.y, Wellipse - 1, r.height - 1),
1488  270, 90, pbrushPen, FALSE);
1489  }
1490  else // < W < H
1491  {
1492  app_draw_arc(dc, rect(r.x, r.y, rx+rx, ry+ry),
1493  90, 180, pbrushPen, FALSE);
1494 
1495  app_draw_arc(dc, rect(r.x,r.y+r.height-ry-ry,rx+rx,ry+ry),
1496  180, 270, pbrushPen, FALSE);
1497 
1498  app_draw_arc(dc, rect(r.x+r.width-rx-rx, r.y+r.height-ry-ry, rx+rx, ry+ry),
1499  270, 360, pbrushPen, FALSE);
1500 
1501  app_draw_arc(dc, rect(r.x+r.width-rx-rx,r.y,rx+rx,ry+ry),
1502  0, 90, pbrushPen, FALSE);
1503  }
1504  if ( Hellipse < r.height)
1505  {
1506  app_fill_rect(dc, rect(r.x, r.y+ry+1, w, r.height-ry-ry), pbrushPen, TRUE);
1507 
1508 
1509  app_fill_rect(dc, rect(r.x+r.width-w, r.y+ry+1, w, r.height-ry-ry),
1510  pbrushPen, TRUE);
1511  }
1512  if ( Wellipse < r.width)
1513  {
1514  app_fill_rect(dc, rect(r.x+rx, r.y+r.height-w, r.width-rx-rx, w),
1515  pbrushPen, TRUE);
1516 
1517  app_fill_rect(dc, rect(r.x+rx, r.y, r.width-rx-rx, w), pbrushPen, TRUE);
1518  }
1519  return TRUE;
1520 }
#define abs(i)
Definition: fconv.c:206
#define TRUE
Definition: types.h:120
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define app_fill_rect(dc, r, BrushObj, Pen)
Definition: drawing.c:107
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
HDC dc
Definition: cylfrac.c:34
static Rect NTAPI rect(int x, int y, int width, int height)
Definition: drawing.c:84
int app_draw_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrushPen, BOOL Chord)
Definition: drawing.c:962
static LPHIST_ENTRY Bottom
Definition: history.c:54
static int NTAPI app_draw_ellipse(DC *g, Rect r, PBRUSH pbrush)
Definition: drawing.c:124
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by IntRoundRect().

◆ IntFillArc()

BOOL FASTCALL IntFillArc ( PDC  dc,
INT  XLeft,
INT  YLeft,
INT  Width,
INT  Height,
double  StartArc,
double  EndArc,
ARCTYPE  arctype 
)

Definition at line 1306 of file drawing.c.

1314 {
1315  PDC_ATTR pdcattr;
1316  PBRUSH pbrush;
1317  int Start = (int)ceil(StartArc);
1318  int End = (int)ceil(EndArc);
1319  BOOL Chord = (arctype == GdiTypeChord), ret;
1320 
1321  pdcattr = dc->pdcattr;
1322 
1323  pbrush = BRUSH_ShareLockBrush(pdcattr->hbrush);
1324  if (!pbrush)
1325  {
1326  DPRINT1("FillArc Fail\n");
1328  return FALSE;
1329  }
1330  // Sort out alignment here.
1331  ret = app_fill_arc(dc, rect( XLeft, YLeft, Width, Height),
1332  (dc->dclevel.flPath & DCPATH_CLOCKWISE) ? -End : -Start,
1333  (dc->dclevel.flPath & DCPATH_CLOCKWISE) ? -Start : -End,
1334  pbrush, Chord);
1335 
1336  BRUSH_ShareUnlockBrush(pbrush);
1337  return ret;
1338 }
#define BRUSH_ShareUnlockBrush(pBrush)
Definition: brush.h:114
_Check_return_ _CRTIMP double __cdecl ceil(_In_ double x)
#define ERROR_INTERNAL_ERROR
Definition: winerror.h:840
HANDLE hbrush
Definition: ntgdihdl.h:299
#define BRUSH_ShareLockBrush(hBrush)
Definition: brush.h:113
BOOL WINAPI Chord(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xRadial1, _In_ INT yRadial1, _In_ INT xRadial2, _In_ INT yRadial2)
Definition: arc.c:119
HDC dc
Definition: cylfrac.c:34
static Rect NTAPI rect(int x, int y, int width, int height)
Definition: drawing.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: types.h:100
int FASTCALL app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL Chord)
Definition: drawing.c:785
Definition: partlist.h:33
int ret
#define DPRINT1
Definition: precomp.h:8
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by IntArc().

◆ IntFillEllipse()

BOOL FASTCALL IntFillEllipse ( PDC  dc,
INT  XLeft,
INT  YLeft,
INT  Width,
INT  Height,
PBRUSH  pbrush 
)

Definition at line 1376 of file drawing.c.

1382 {
1383  return (BOOL)app_fill_ellipse(dc, rect( XLeft, YLeft, Width, Height), pbrush);
1384 }
HDC dc
Definition: cylfrac.c:34
static Rect NTAPI rect(int x, int y, int width, int height)
Definition: drawing.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
static int FASTCALL app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
Definition: drawing.c:617

Referenced by NtGdiEllipse().

◆ IntFillRoundRect()

BOOL FASTCALL IntFillRoundRect ( PDC  dc,
INT  Left,
INT  Top,
INT  Right,
INT  Bottom,
INT  Wellipse,
INT  Hellipse,
PBRUSH  pbrush 
)

Definition at line 1388 of file drawing.c.

1396 {
1397  Rect r;
1398  int rx, ry; /* Radius in x and y directions */
1399 
1400  // x y Width Height
1401  r = rect( Left, Top, abs(Right-Left), abs(Bottom-Top));
1402  rx = Wellipse/2;
1403  ry = Hellipse/2;
1404 
1405  if (Wellipse > r.width)
1406  {
1407  if (Hellipse > r.height) // > W > H
1408  app_fill_ellipse(dc, r, pbrush);
1409  else // > W < H
1410  {
1411  app_fill_arc(dc, rect( r.x, r.y, r.width - 1, Hellipse),
1412  0, 180, pbrush,FALSE);
1413  app_fill_arc(dc, rect(r.x, Bottom - Hellipse - 1, r.width - 1, Hellipse),
1414  180, 360, pbrush, FALSE);
1415  }
1416  }
1417  else if(Hellipse > r.height) // < W > H
1418  {
1419  app_fill_arc(dc, rect(r.x, r.y, Wellipse, r.height - 1),
1420  90, 270, pbrush, FALSE);
1421  app_fill_arc(dc, rect(Right - Wellipse - 1, r.y, Wellipse, r.height - 1),
1422  270, 90, pbrush,FALSE);
1423  }
1424  else // < W < H
1425  {
1426  app_fill_arc(dc, rect(r.x, r.y, rx+rx, ry+ry),
1427  90, 180, pbrush, FALSE);
1428 
1429  app_fill_arc(dc, rect(r.x, r.y+r.height-ry-ry, rx+rx, ry+ry),
1430  180, 270, pbrush, FALSE);
1431 
1432  app_fill_arc(dc, rect(r.x+r.width-rx-rx, r.y+r.height-ry-ry, rx+rx, ry+ry),
1433  270, 360, pbrush,FALSE);
1434 
1435  app_fill_arc(dc, rect(r.x+r.width-rx-rx, r.y, rx+rx, ry+ry),
1436  0, 90, pbrush,FALSE);
1437  }
1438  if (Wellipse < r.width)
1439  {
1440  app_fill_rect(dc, rect(r.x+rx, r.y, r.width-rx-rx, ry+1), pbrush, FALSE);
1441  app_fill_rect(dc, rect(r.x+rx, r.y+r.height-ry+1, r.width-rx-rx, ry-1), pbrush, FALSE);
1442  }
1443  if (Hellipse < r.height)
1444  {
1445  app_fill_rect(dc, rect(r.x, r.y+ry+1, r.width, r.height-ry-ry), pbrush, FALSE);
1446  }
1447 
1448  return TRUE;
1449 }
#define abs(i)
Definition: fconv.c:206
#define TRUE
Definition: types.h:120
#define app_fill_rect(dc, r, BrushObj, Pen)
Definition: drawing.c:107
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
HDC dc
Definition: cylfrac.c:34
static Rect NTAPI rect(int x, int y, int width, int height)
Definition: drawing.c:84
int FASTCALL app_fill_arc(DC *g, Rect r, int start_angle, int end_angle, PBRUSH pbrush, BOOL Chord)
Definition: drawing.c:785
static int FASTCALL app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
Definition: drawing.c:617
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by IntRoundRect().

◆ IntGdiCreateDC()

HDC FASTCALL IntGdiCreateDC ( PUNICODE_STRING  Driver,
PUNICODE_STRING  Device,
PVOID  pUMdhpdev,
CONST PDEVMODEW  InitData,
BOOL  CreateAsIC 
)

Definition at line 1043 of file dclife.c.

1049 {
1050  HDC hdc;
1051 
1052  hdc = GreOpenDCW(pustrDevice,
1053  pdmInit,
1054  NULL,
1055  CreateAsIC ? DCTYPE_INFO :
1057  TRUE,
1058  NULL,
1059  NULL,
1060  pUMdhpdev);
1061 
1062  return hdc;
1063 }
#define TRUE
Definition: types.h:120
static HDC
Definition: imagelist.c:92
smooth NULL
Definition: ftsmooth.c:416
_In_ PCUNICODE_STRING _In_ PVOID Driver
Definition: cmfuncs.h:32
HDC NTAPI GreOpenDCW(PUNICODE_STRING pustrDevice, DEVMODEW *pdmInit, PUNICODE_STRING pustrLogAddr, ULONG iType, BOOL bDisplay, HANDLE hspool, VOID *pDriverInfo2, PVOID *pUMdhpdev)
Definition: dclife.c:640
HDC hdc
Definition: main.c:9
Definition: dc.h:43
#define DC_TYPE_DIRECT
Definition: ntgdihdl.h:123

Referenced by co_IntInitializeDesktopGraphics(), DceCreateDisplayDC(), IntGdiCreateDisplayDC(), and UserLoadImage().

◆ IntGdiLineTo()

BOOL FASTCALL IntGdiLineTo ( DC dc,
int  XEnd,
int  YEnd 
)

Definition at line 146 of file line.c.

149 {
150  SURFACE *psurf;
151  BOOL Ret = TRUE;
152  PBRUSH pbrLine;
153  RECTL Bounds;
154  POINT Points[2];
155  PDC_ATTR pdcattr = dc->pdcattr;
157 
158  if (PATH_IsPathOpen(dc->dclevel))
159  {
160  Ret = PATH_LineTo(dc, XEnd, YEnd);
161  }
162  else
163  {
164  psurf = dc->dclevel.pSurface;
165  if (NULL == psurf)
166  {
168  return FALSE;
169  }
170 
171  Points[0].x = pdcattr->ptlCurrent.x;
172  Points[0].y = pdcattr->ptlCurrent.y;
173  Points[1].x = XEnd;
174  Points[1].y = YEnd;
175 
176  IntLPtoDP(dc, Points, 2);
177 
178  /* The DCOrg is in device coordinates */
179  Points[0].x += dc->ptlDCOrig.x;
180  Points[0].y += dc->ptlDCOrig.y;
181  Points[1].x += dc->ptlDCOrig.x;
182  Points[1].y += dc->ptlDCOrig.y;
183 
184  Bounds.left = min(Points[0].x, Points[1].x);
185  Bounds.top = min(Points[0].y, Points[1].y);
186  Bounds.right = max(Points[0].x, Points[1].x);
187  Bounds.bottom = max(Points[0].y, Points[1].y);
188 
189  /* Get BRUSH from current pen. */
190  pbrLine = dc->dclevel.pbrLine;
191  ASSERT(pbrLine);
192 
193  if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR))
194  {
195  DPRINT("Bounds dc %p l %d t %d\n",dc,Bounds.left,Bounds.top);
196  DPRINT(" r %d b %d\n",Bounds.right,Bounds.bottom);
197  AddPenLinesBounds(dc, 2, Points);
198  }
199 
200  if (!(pbrLine->flAttrs & BR_IS_NULL))
201  {
202  Ret = IntEngLineTo(&psurf->SurfObj,
203  (CLIPOBJ *)&dc->co,
204  &dc->eboLine.BrushObject,
205  Points[0].x, Points[0].y,
206  Points[1].x, Points[1].y,
207  &Bounds,
208  ROP2_TO_MIX(pdcattr->jROP2));
209  }
210 
211  }
212 
213  if (Ret)
214  {
215  pdcattr->ptlCurrent.x = XEnd;
216  pdcattr->ptlCurrent.y = YEnd;
217  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
218  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
220  }
221 
222  return Ret;
223 }
#define ROP2_TO_MIX(Rop2)
Definition: inteng.h:40
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
long bottom
Definition: polytest.cpp:53
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC dc
Definition: cylfrac.c:34
LONG y
Definition: windef.h:315
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:154
long right
Definition: polytest.cpp:53
unsigned int BOOL
Definition: ntddk_ex.h:94
long top
Definition: polytest.cpp:53
SURFOBJ SurfObj
Definition: surface.h:8
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
long left
Definition: polytest.cpp:53
ULONG ulDirty_
Definition: ntgdihdl.h:298
Definition: types.h:100
#define PATH_IsPathOpen(dclevel)
Definition: path.h:74
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:155
BYTE jROP2
Definition: ntgdihdl.h:311
#define BR_IS_NULL
Definition: brush.h:101
LONG x
Definition: windef.h:314
BOOL FASTCALL PATH_LineTo(PDC dc, INT x, INT y)
Definition: path.c:570
void IntEngLineTo(SURFOBJ *, CLIPOBJ, PBRUSHOBJ, int x1, int y1, int x2, int y2, RECTL *, MIX mix)
Definition: polytest.cpp:107
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define IntLPtoDP(pdc, ppt, count)
Definition: coord.h:7
#define ASSERT_DC_PREPARED(pdc)
Definition: dc.h:299
POINTL ptfxCurrent
Definition: ntgdihdl.h:316
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:153
#define min(a, b)
Definition: monoChain.cc:55
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define CoordLPtoDP(pdc, ppt)
Definition: coord.h:11
VOID FASTCALL AddPenLinesBounds(PDC dc, int count, POINT *points)
Definition: line.c:17
POINTL ptlCurrent
Definition: ntgdihdl.h:315
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by IntGdiArcInternal(), and NtGdiLineTo().

◆ IntGdiMoveToEx()

BOOL FASTCALL IntGdiMoveToEx ( DC dc,
int  X,
int  Y,
LPPOINT  Point 
)

Definition at line 78 of file line.c.

82 {
83  PDC_ATTR pdcattr = dc->pdcattr;
84  if ( Point )
85  {
86  if ( pdcattr->ulDirty_ & DIRTY_PTLCURRENT ) // Double hit!
87  {
88  Point->x = pdcattr->ptfxCurrent.x; // ret prev before change.
89  Point->y = pdcattr->ptfxCurrent.y;
90  IntDPtoLP ( dc, Point, 1); // Reconvert back.
91  }
92  else
93  {
94  Point->x = pdcattr->ptlCurrent.x;
95  Point->y = pdcattr->ptlCurrent.y;
96  }
97  }
98  pdcattr->ptlCurrent.x = X;
99  pdcattr->ptlCurrent.y = Y;
100  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
101  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
103 
104  return TRUE;
105 }
#define IntDPtoLP(pdc, ppt, count)
Definition: coord.h:13
#define TRUE
Definition: types.h:120
#define Y(I)
HDC dc
Definition: cylfrac.c:34
LONG y
Definition: windef.h:315
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:154
ULONG ulDirty_
Definition: ntgdihdl.h:298
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:155
LONG x
Definition: windef.h:314
POINTL ptfxCurrent
Definition: ntgdihdl.h:316
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:153
#define CoordLPtoDP(pdc, ppt)
Definition: coord.h:11
POINTL ptlCurrent
Definition: ntgdihdl.h:315
#define X(b, s)

Referenced by _Success_(), add_log_points_new_stroke(), GreMoveTo(), IntGdiAngleArc(), IntGdiArcInternal(), NtGdiPolyDraw(), PATH_PolyDraw(), and PATH_StrokePath().

◆ IntGdiPolyBezier()

BOOL FASTCALL IntGdiPolyBezier ( DC dc,
LPPOINT  pt,
DWORD  Count 
)

Definition at line 226 of file line.c.

229 {
230  BOOL ret = FALSE; // Default to FAILURE
231 
232  if ( PATH_IsPathOpen(dc->dclevel) )
233  {
234  return PATH_PolyBezier ( dc, pt, Count );
235  }
236 
237  /* We'll convert it into line segments and draw them using Polyline */
238  {
239  POINT *Pts;
240  INT nOut;
241 
242  Pts = GDI_Bezier ( pt, Count, &nOut );
243  if ( Pts )
244  {
245  ret = IntGdiPolyline(dc, Pts, nOut);
247  }
248  }
249 
250  return ret;
251 }
#define pt(x, y)
Definition: drawing.c:79
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
HDC dc
Definition: cylfrac.c:34
int32_t INT
Definition: typedefs.h:56
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TAG_BEZIER
Definition: tags.h:13
#define PATH_IsPathOpen(dclevel)
Definition: path.h:74
BOOL FASTCALL IntGdiPolyline(DC *dc, LPPOINT pt, int Count)
Definition: line.c:291
POINT * GDI_Bezier(const POINT *Points, INT count, INT *nPtsOut)
Definition: bezier.c:189
BOOL FASTCALL PATH_PolyBezier(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1106
int ret
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099

Referenced by IntGdiPolyBezierTo(), and NtGdiPolyPolyDraw().

◆ IntGdiPolyBezierTo()

BOOL FASTCALL IntGdiPolyBezierTo ( DC dc,
LPPOINT  pt,
DWORD  Count 
)

Definition at line 254 of file line.c.

257 {
258  BOOL ret = FALSE; // Default to failure
259  PDC_ATTR pdcattr = dc->pdcattr;
260 
261  if ( PATH_IsPathOpen(dc->dclevel) )
262  ret = PATH_PolyBezierTo ( dc, pt, Count );
263  else /* We'll do it using PolyBezier */
264  {
265  POINT *npt;
267  sizeof(POINT) * (Count + 1),
268  TAG_BEZIER);
269  if ( npt )
270  {
271  npt[0].x = pdcattr->ptlCurrent.x;
272  npt[0].y = pdcattr->ptlCurrent.y;
273  memcpy(npt + 1, pt, sizeof(POINT) * Count);
274  ret = IntGdiPolyBezier(dc, npt, Count+1);
276  }
277  }
278  if ( ret )
279  {
280  pdcattr->ptlCurrent.x = pt[Count-1].x;
281  pdcattr->ptlCurrent.y = pt[Count-1].y;
282  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
283  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
285  }
286 
287  return ret;
288 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
HDC dc
Definition: cylfrac.c:34
LONG y
Definition: windef.h:315
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:154
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL FASTCALL PATH_PolyBezierTo(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1083
#define TAG_BEZIER
Definition: tags.h:13
ULONG ulDirty_
Definition: ntgdihdl.h:298
#define PATH_IsPathOpen(dclevel)
Definition: path.h:74
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:155
LONG x
Definition: windef.h:314
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
POINTL ptfxCurrent
Definition: ntgdihdl.h:316
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:153
BOOL FASTCALL IntGdiPolyBezier(DC *dc, LPPOINT pt, DWORD Count)
Definition: line.c:226
#define CoordLPtoDP(pdc, ppt)
Definition: coord.h:11
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
POINTL ptlCurrent
Definition: ntgdihdl.h:315

Referenced by NtGdiPolyPolyDraw().

◆ IntGdiPolyline()

BOOL FASTCALL IntGdiPolyline ( DC dc,
LPPOINT  pt,
int  Count 
)

Definition at line 291 of file line.c.

294 {
295  SURFACE *psurf;
296  BRUSH *pbrLine;
297  LPPOINT Points;
298  BOOL Ret = TRUE;
299  LONG i;
300  PDC_ATTR pdcattr = dc->pdcattr;
301 
302  if (!dc->dclevel.pSurface)
303  {
304  return TRUE;
305  }
306 
308  psurf = dc->dclevel.pSurface;
309 
310  /* Get BRUSHOBJ from current pen. */
311  pbrLine = dc->dclevel.pbrLine;
312  ASSERT(pbrLine);
313 
314  if (!(pbrLine->flAttrs & BR_IS_NULL))
315  {
316  Points = EngAllocMem(0, Count * sizeof(POINT), GDITAG_TEMP);
317  if (Points != NULL)
318  {
319  RtlCopyMemory(Points, pt, Count * sizeof(POINT));
320  IntLPtoDP(dc, Points, Count);
321 
322  /* Offset the array of points by the DC origin */
323  for (i = 0; i < Count; i++)
324  {
325  Points[i].x += dc->ptlDCOrig.x;
326  Points[i].y += dc->ptlDCOrig.y;
327  }
328 
329  if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR))
330  {
331  AddPenLinesBounds(dc, Count, Points);
332  }
333 
334  Ret = IntEngPolyline(&psurf->SurfObj,
335  (CLIPOBJ *)&dc->co,
336  &dc->eboLine.BrushObject,
337  Points,
338  Count,
339  ROP2_TO_MIX(pdcattr->jROP2));
340 
341  EngFreeMem(Points);
342  }
343  else
344  {
345  Ret = FALSE;
346  }
347  }
348 
350 
351  return Ret;
352 }
#define ROP2_TO_MIX(Rop2)
Definition: inteng.h:40
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define GDITAG_TEMP
Definition: tags.h:166
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
#define EngFreeMem
Definition: polytest.cpp:56
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
HDC dc
Definition: cylfrac.c:34
ULONG flAttrs
Definition: brush.h:19
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
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
SURFOBJ SurfObj
Definition: surface.h:8
smooth NULL
Definition: ftsmooth.c:416
Definition: brush.hpp:15
BYTE jROP2
Definition: ntgdihdl.h:311
#define BR_IS_NULL
Definition: brush.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
#define IntLPtoDP(pdc, ppt, count)
Definition: coord.h:7
BOOL APIENTRY IntEngPolyline(SURFOBJ *DestSurf, CLIPOBJ *Clip, BRUSHOBJ *Brush, CONST LPPOINT pt, LONG dCount, MIX mix)
Definition: lineto.c:703
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
Definition: dclife.c:505
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
Definition: dclife.c:614
VOID FASTCALL AddPenLinesBounds(PDC dc, int count, POINT *points)
Definition: line.c:17

Referenced by IntGdiPolyBezier(), IntGdiPolylineTo(), IntGdiPolyPolyline(), NtGdiPolyDraw(), and PATH_StrokePath().

◆ IntGdiPolylineTo()

BOOL FASTCALL IntGdiPolylineTo ( DC dc,
LPPOINT  pt,
DWORD  Count 
)

Definition at line 355 of file line.c.

358 {
359  BOOL ret = FALSE; // Default to failure
360  PDC_ATTR pdcattr = dc->pdcattr;
361 
362  if (PATH_IsPathOpen(dc->dclevel))
363  {
365  }
366  else /* Do it using Polyline */
367  {
369  sizeof(POINT) * (Count + 1),
370  TAG_SHAPE);
371  if ( pts )
372  {
373  pts[0].x = pdcattr->ptlCurrent.x;
374  pts[0].y = pdcattr->ptlCurrent.y;
375  memcpy( pts + 1, pt, sizeof(POINT) * Count);
376  ret = IntGdiPolyline(dc, pts, Count + 1);
378  }
379  }
380  if ( ret )
381  {
382  pdcattr->ptlCurrent.x = pt[Count-1].x;
383  pdcattr->ptlCurrent.y = pt[Count-1].y;
384  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
385  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
387  }
388 
389  return ret;
390 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
HDC dc
Definition: cylfrac.c:34
#define TAG_SHAPE
Definition: tags.h:14
LONG y
Definition: windef.h:315
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:154
unsigned int BOOL
Definition: ntddk_ex.h:94
ULONG ulDirty_
Definition: ntgdihdl.h:298
#define PATH_IsPathOpen(dclevel)
Definition: path.h:74
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:155
BOOL FASTCALL PATH_PolylineTo(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1216
BOOL FASTCALL IntGdiPolyline(DC *dc, LPPOINT pt, int Count)
Definition: line.c:291
LONG x
Definition: windef.h:314
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
POINTL ptfxCurrent
Definition: ntgdihdl.h:316
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:153
#define CoordLPtoDP(pdc, ppt)
Definition: coord.h:11
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
POINTL ptlCurrent
Definition: ntgdihdl.h:315

Referenced by NtGdiPolyPolyDraw().

◆ IntGdiPolyPolyline()

BOOL FASTCALL IntGdiPolyPolyline ( DC dc,
LPPOINT  pt,
PULONG  PolyPoints,
DWORD  Count 
)

Definition at line 394 of file line.c.

398 {
399  ULONG i;
400  LPPOINT pts;
401  PULONG pc;
402  BOOL ret = FALSE; // Default to failure
403  pts = pt;
404  pc = PolyPoints;
405 
406  if (PATH_IsPathOpen(dc->dclevel))
407  {
408  return PATH_PolyPolyline( dc, pt, PolyPoints, Count );
409  }
410  for (i = 0; i < Count; i++)
411  {
412  ret = IntGdiPolyline ( dc, pts, *pc );
413  if (ret == FALSE)
414  {
415  return ret;
416  }
417  pts+=*pc++;
418  }
419 
420  return ret;
421 }
#define pt(x, y)
Definition: drawing.c:79
BOOL FASTCALL PATH_PolyPolyline(PDC dc, const POINT *pts, const DWORD *counts, DWORD polylines)
Definition: path.c:1290
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
HDC dc
Definition: cylfrac.c:34
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
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
#define PATH_IsPathOpen(dclevel)
Definition: path.h:74
BOOL FASTCALL IntGdiPolyline(DC *dc, LPPOINT pt, int Count)
Definition: line.c:291
int ret
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1

Referenced by NtGdiPolyPolyDraw().

◆ IntGdiSetHookFlags()

WORD APIENTRY IntGdiSetHookFlags ( HDC  hDC,
WORD  Flags 
)

Definition at line 422 of file dcutil.c.

423 {
424  WORD wRet;
425  DC *dc = DC_LockDc(hDC);
426 
427  if (NULL == dc)
428  {
430  return 0;
431  }
432 
433  wRet = dc->fs & DC_FLAG_DIRTY_RAO; // FIXME: Wrong flag!
434 
435  /* Info in "Undocumented Windows" is slightly confusing. */
436  DPRINT("DC %p, Flags %04x\n", hDC, Flags);
437 
439  {
440  /* hVisRgn has to be updated */
441  dc->fs |= DC_FLAG_DIRTY_RAO;
442  }
443  else if (Flags & DCHF_VALIDATEVISRGN || 0 == Flags)
444  {
445  //dc->fs &= ~DC_FLAG_DIRTY_RAO;
446  }
447 
448  DC_UnlockDc(dc);
449 
450  return wRet;
451 }
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
HDC dc
Definition: cylfrac.c:34
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
Definition: polytest.cpp:40
#define DC_FLAG_DIRTY_RAO
Definition: ntgdihdl.h:132
unsigned short WORD
Definition: ntddk_ex.h:93
static HDC hDC
Definition: 3dtext.c:33
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
#define DCHF_INVALIDATEVISRGN
Definition: gdi_driver.h:267
#define DCHF_VALIDATEVISRGN
Definition: gdi_driver.h:268
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by DceDeleteClipRgn(), DceResetActiveDCEs(), and UserGetDCEx().

◆ IntGetDIBColorTable()

UINT APIENTRY IntGetDIBColorTable ( HDC  hDC,
UINT  StartIndex,
UINT  Entries,
RGBQUAD Colors 
)

◆ IntGetPaletteEntries()

UINT APIENTRY IntGetPaletteEntries ( HPALETTE  hpal,
UINT  StartIndex,
UINT  Entries,
LPPALETTEENTRY  pe 
)

Definition at line 855 of file palette.c.

860 {
861  PPALETTE palGDI;
862  UINT numEntries;
863 
864  palGDI = (PPALETTE) PALETTE_ShareLockPalette(hpal);
865  if (NULL == palGDI)
866  {
867  return 0;
868  }
869 
870  numEntries = palGDI->NumColors;
871  if (NULL != pe)
872  {
873  if (numEntries < StartIndex + Entries)
874  {
875  Entries = numEntries - StartIndex;
876  }
877  if (numEntries <= StartIndex)
878  {
880  return 0;
881  }
882  memcpy(pe, palGDI->IndexedColors + StartIndex, Entries * sizeof(PALETTEENTRY));
883  }
884  else
885  {
886  Entries = numEntries;
887  }
888 
890  return Entries;
891 }
struct _PALETTE * PPALETTE
PALETTEENTRY * IndexedColors
Definition: palette.h:42
smooth NULL
Definition: ftsmooth.c:416
#define PALETTE_ShareLockPalette(hpal)
Definition: palette.h:57
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
ULONG NumColors
Definition: palette.h:41
LIST_ENTRY Entries[5]
Definition: ExDoubleList.c:8
#define PALETTE_ShareUnlockPalette(ppal)
Definition: palette.h:59
unsigned int UINT
Definition: ndis.h:50

Referenced by NtGdiDoPalette().

◆ IntGetSysColor()

◆ IntGetSysColorBrush()

◆ IntGetSystemPaletteEntries()

UINT APIENTRY IntGetSystemPaletteEntries ( HDC  hDC,
UINT  StartIndex,
UINT  Entries,
LPPALETTEENTRY  pe 
)

Definition at line 894 of file palette.c.

898 {
899  PPALETTE palGDI = NULL;
900  PDC dc = NULL;
901  UINT EntriesSize = 0;
902  UINT Ret = 0;
903 
904  if (Entries == 0)
905  {
907  return 0;
908  }
909 
910  if (pe != NULL)
911  {
912  EntriesSize = Entries * sizeof(pe[0]);
913  if (Entries != EntriesSize / sizeof(pe[0]))
914  {
915  /* Integer overflow! */
917  return 0;
918  }
919  }
920 
921  if (!(dc = DC_LockDc(hDC)))
922  {
924  return 0;
925  }
926 
927  palGDI = PALETTE_ShareLockPalette(dc->dclevel.hpal);
928  if (palGDI != NULL)
929  {
930  if (pe != NULL)
931  {
932  if (StartIndex >= palGDI->NumColors)
933  Entries = 0;
934  else if (Entries > palGDI->NumColors - StartIndex)
935  Entries = palGDI->NumColors - StartIndex;
936 
937  memcpy(pe,
938  palGDI->IndexedColors + StartIndex,
939  Entries * sizeof(pe[0]));
940 
941  Ret = Entries;
942  }
943  else
944  {
945  Ret = dc->ppdev->gdiinfo.ulNumPalReg;
946  }
947  }
948 
949  if (palGDI != NULL)
951 
952  if (dc != NULL)
953  DC_UnlockDc(dc);
954 
955  return Ret;
956 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
PALETTEENTRY * IndexedColors
Definition: palette.h:42
HDC dc
Definition: cylfrac.c:34
smooth NULL
Definition: ftsmooth.c:416
#define PALETTE_ShareLockPalette(hpal)
Definition: palette.h:57
Definition: polytest.cpp:40
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
ULONG NumColors
Definition: palette.h:41
static HDC hDC
Definition: 3dtext.c:33
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
LIST_ENTRY Entries[5]
Definition: ExDoubleList.c:8
#define PALETTE_ShareUnlockPalette(ppal)
Definition: palette.h:59
unsigned int UINT
Definition: ndis.h:50
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by NtGdiDoPalette().

◆ IntSetDIBColorTable()

UINT APIENTRY IntSetDIBColorTable ( HDC  hDC,
UINT  StartIndex,
UINT  Entries,
CONST RGBQUAD Colors 
)

◆ IntSetSysColors()

VOID FASTCALL IntSetSysColors ( UINT  nColors,
CONST INT Elements,
CONST COLORREF Colors 
)

Definition at line 300 of file stockobj.c.

301 {
302  UINT i;
303 
304  for (i = 0; i < nColors; i++)
305  {
306  if ((UINT)(*Elements) < NUM_SYSCOLORS)
307  {
308  gpsi->argbSystem[*Elements] = *Colors;
309  IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
310  }
311  Elements++;
312  Colors++;
313  }
314 }
PSERVERINFO gpsi
Definition: main.c:27
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
Definition: glfuncs.h:248
Colors
Definition: ansiprsr.h:4
VOID NTAPI IntGdiSetSolidBrushColor(_In_ HBRUSH hbr, _In_ COLORREF crColor)
Definition: brush.cpp:306
#define NUM_SYSCOLORS
Definition: SetSysColors.c:10
unsigned int UINT
Definition: ndis.h:50

Referenced by NtUserSetSysColors().

◆ NtDxEngGetRedirectionBitmap()

DWORD APIENTRY NtDxEngGetRedirectionBitmap ( DWORD  Unknown0)

Definition at line 1001 of file ntstubs.c.

1003 {
1004  STUB;
1005  return 0;
1006 }
#define STUB
Definition: kernel32.h:27

◆ NtGdiFlushUserBatch()

NTSTATUS APIENTRY NtGdiFlushUserBatch ( VOID  )

Definition at line 487 of file gdibatch.c.

488 {
489  PTEB pTeb = NtCurrentTeb();
490  ULONG GdiBatchCount = pTeb->GdiBatchCount;
491 
492  if( (GdiBatchCount > 0) && (GdiBatchCount <= (GDIBATCHBUFSIZE/4)))
493  {
494  HDC hDC = (HDC) pTeb->GdiTebBatch.HDC;
495 
496  /* If hDC is zero and the buffer fills up with delete objects we need
497  to run anyway.
498  */
499  if (hDC || GdiBatchCount)
500  {
501  PCHAR pHdr = (PCHAR)&pTeb->GdiTebBatch.Buffer[0];
502  PDC pDC = NULL;
503 
505  {
506  pDC = DC_LockDc(hDC);
507  }
508 
509  // No need to init anything, just go!
510  for (; GdiBatchCount > 0; GdiBatchCount--)
511  {
512  ULONG Size;
513  // Process Gdi Batch!
514  Size = GdiFlushUserBatch(pDC, (PGDIBATCHHDR) pHdr);
515  if (!Size) break;
516  pHdr += Size;
517  }
518 
519  if (pDC)
520  {
521  DC_UnlockDc(pDC);
522  }
523 
524  // Exit and clear out for the next round.
525  pTeb->GdiTebBatch.Offset = 0;
526  pTeb->GdiBatchCount = 0;
527  pTeb->GdiTebBatch.HDC = 0;
528  }
529  }
530 
531  // FIXME: On Windows XP the function returns &pTeb->RealClientId, maybe VOID?
532  return STATUS_SUCCESS;
533 }
signed char * PCHAR
Definition: retypes.h:7
BOOL NTAPI GreIsHandleValid(HGDIOBJ hobj)
Definition: gdiobj.c:1143
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
static HDC
Definition: imagelist.c:92
ULONG Buffer[GDI_BATCH_BUFFER_SIZE]
Definition: compat.h:482
ULONG FASTCALL GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
Definition: gdibatch.c:70
#define GDIBATCHBUFSIZE
Definition: ntgdityp.h:199
smooth NULL
Definition: ftsmooth.c:416
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
#define PCHAR
Definition: match.c:90
Definition: polytest.cpp:40
if(!(yy_init))
Definition: macro.lex.yy.c:714
GDI_TEB_BATCH GdiTebBatch
Definition: compat.h:506
ULONG GdiBatchCount
Definition: compat.h:536
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
static HDC hDC
Definition: 3dtext.c:33
Definition: compat.h:484
ULONG Offset
Definition: compat.h:480
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:2966
HANDLE HDC
Definition: compat.h:481

Referenced by DriverEntry().

Variable Documentation

◆ hsemDriverMgmt

HSEMAPHORE hsemDriverMgmt

◆ hSystemBM

HDC hSystemBM