ReactOS 0.4.17-dev-204-g71540fd
painting.c File Reference
#include <precomp.h>
Include dependency graph for painting.c:

Go to the source code of this file.

Functions

BOOL WINAPI LineTo (_In_ HDC hdc, _In_ INT x, _In_ INT y)
 
BOOL WINAPI MoveToEx (_In_ HDC hdc, _In_ INT x, _In_ INT y, _Out_opt_ LPPOINT ppt)
 
BOOL WINAPI Ellipse (_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom)
 
BOOL WINAPI Rectangle (_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom)
 
BOOL WINAPI RoundRect (_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom, _In_ INT width, _In_ INT height)
 
COLORREF WINAPI GetPixel (_In_ HDC hdc, _In_ INT x, _In_ INT y)
 
COLORREF WINAPI SetPixel (_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
 
BOOL WINAPI SetPixelV (_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
 
BOOL WINAPI FillRgn (_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbr)
 
BOOL WINAPI FrameRgn (_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbr, _In_ INT nWidth, _In_ INT nHeight)
 
BOOL WINAPI InvertRgn (_In_ HDC hdc, _In_ HRGN hrgn)
 
BOOL WINAPI PaintRgn (_In_ HDC hdc, _In_ HRGN hrgn)
 
BOOL WINAPI PolyBezier (_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
 
BOOL WINAPI PolyBezierTo (_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
 
BOOL WINAPI PolyDraw (_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_reads_(cpt) const BYTE *aj, _In_ INT cpt)
 
BOOL WINAPI Polygon (_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ INT cpt)
 
BOOL WINAPI Polyline (_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ INT cpt)
 
BOOL WINAPI PolylineTo (_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
 
BOOL WINAPI PolyPolygon (_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const INT *asz, _In_ INT csz)
 
BOOL WINAPI PolyPolyline (_In_ HDC hdc, _In_ CONST POINT *apt, _In_reads_(csz) CONST DWORD *asz, _In_ DWORD csz)
 
BOOL WINAPI ExtFloodFill (_In_ HDC hdc, _In_ INT xStart, _In_ INT yStart, _In_ COLORREF crFill, _In_ UINT fuFillType)
 
BOOL WINAPI FloodFill (_In_ HDC hdc, _In_ INT xStart, _In_ INT yStart, _In_ COLORREF crFill)
 
BOOL WINAPI BitBlt (_In_ HDC hdcDest, _In_ INT xDest, _In_ INT yDest, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD dwRop)
 
BOOL WINAPI PatBlt (_In_ HDC hdc, _In_ INT nXLeft, _In_ INT nYLeft, _In_ INT nWidth, _In_ INT nHeight, _In_ DWORD dwRop)
 
BOOL WINAPI PolyPatBlt (_In_ HDC hdc, _In_ DWORD dwRop, _In_ PPOLYPATBLT pPoly, _In_ DWORD nCount, _In_ DWORD dwMode)
 
BOOL WINAPI StretchBlt (_In_ HDC hdcDest, _In_ INT xDest, _In_ INT yDest, _In_ INT cxDest, _In_ INT cyDest, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ DWORD dwRop)
 
BOOL WINAPI MaskBlt (_In_ HDC hdcDest, _In_ INT xDest, _In_ INT yDest, _In_ INT cx, _In_ INT cy, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ HBITMAP hbmMask, _In_ INT xMask, _In_ INT yMask, _In_ DWORD dwRop)
 
BOOL WINAPI PlgBlt (_In_ HDC hdcDest, _In_reads_(3) const POINT *ppt, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cx, _In_ INT cy, _In_opt_ HBITMAP hbmMask, _In_ INT xMask, _In_ INT yMask)
 
BOOL WINAPI GdiAlphaBlend (_In_ HDC hdcDst, _In_ INT xDst, _In_ INT yDst, _In_ INT cxDst, _In_ INT cyDst, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ BLENDFUNCTION blendfn)
 
BOOL WINAPI GdiTransparentBlt (_In_ HDC hdcDst, _In_ INT xDst, _In_ INT yDst, _In_ INT cxDst, _In_ INT cyDst, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ UINT crTransparent)
 
BOOL WINAPI GdiGradientFill (_In_ HDC hdc, _In_reads_(nVertex) PTRIVERTEX pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nCount, _In_ ULONG ulMode)
 

Function Documentation

◆ BitBlt()

BOOL WINAPI BitBlt ( _In_ HDC  hdcDest,
_In_ INT  xDest,
_In_ INT  yDest,
_In_ INT  cx,
_In_ INT  cy,
_In_opt_ HDC  hdcSrc,
_In_ INT  xSrc,
_In_ INT  ySrc,
_In_ DWORD  dwRop 
)

Definition at line 511 of file painting.c.

521{
522 /* Use PatBlt for no source blt, like windows does */
523 if (!ROP_USES_SOURCE(dwRop))
524 {
525 return PatBlt(hdcDest, xDest, yDest, cx, cy, dwRop);
526 }
527
528 /* For meta DCs we use StretchBlt via emfdc.c */
530 BitBlt,
531 FALSE,
532 hdcDest,
533 xDest,
534 yDest,
535 cx,
536 cy,
537 hdcSrc,
538 xSrc,
539 ySrc,
540 dwRop);
541
542 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
543
544 return NtGdiBitBlt(hdcDest, xDest, yDest, cx, cy, hdcSrc, xSrc, ySrc, dwRop, CLR_INVALID, 0);
545}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
HDC WINAPI GdiConvertAndCheckDC(HDC hdc)
Definition: dc.c:403
#define HANDLE_METADC(_RetType, _Func, dwError, hdc,...)
Definition: gdi32p.h:615
#define ROP_USES_SOURCE(Rop)
Definition: gdi32p.h:88
BOOL WINAPI PatBlt(_In_ HDC hdc, _In_ INT nXLeft, _In_ INT nYLeft, _In_ INT nWidth, _In_ INT nHeight, _In_ DWORD dwRop)
Definition: painting.c:549
BOOL WINAPI BitBlt(_In_ HDC hdcDest, _In_ INT xDest, _In_ INT yDest, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD dwRop)
Definition: painting.c:511
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
__kernel_entry W32KAPI BOOL APIENTRY NtGdiBitBlt(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD rop4, _In_ DWORD crBackColor, _In_ FLONG fl)
#define CLR_INVALID
Definition: wingdi.h:883
static HDC hdcSrc
Definition: xlate.c:32

Referenced by BitBlt().

◆ Ellipse()

BOOL WINAPI Ellipse ( _In_ HDC  hdc,
_In_ INT  left,
_In_ INT  top,
_In_ INT  right,
_In_ INT  bottom 
)

Definition at line 71 of file painting.c.

77{
79
80 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
81
82 return NtGdiEllipse(hdc, left, top, right, bottom);
83}
BOOL WINAPI Ellipse(_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom)
Definition: painting.c:71
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
HDC hdc
Definition: main.c:9
__kernel_entry W32KAPI BOOL APIENTRY NtGdiEllipse(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)

Referenced by Ellipse().

◆ ExtFloodFill()

BOOL WINAPI ExtFloodFill ( _In_ HDC  hdc,
_In_ INT  xStart,
_In_ INT  yStart,
_In_ COLORREF  crFill,
_In_ UINT  fuFillType 
)

Definition at line 477 of file painting.c.

483{
484 HANDLE_METADC(BOOL, ExtFloodFill, FALSE, hdc, xStart, yStart, crFill, fuFillType);
485
486 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
487
488 return NtGdiExtFloodFill(hdc, xStart, yStart, crFill, fuFillType);
489}
BOOL WINAPI ExtFloodFill(_In_ HDC hdc, _In_ INT xStart, _In_ INT yStart, _In_ COLORREF crFill, _In_ UINT fuFillType)
Definition: painting.c:477
__kernel_entry W32KAPI BOOL APIENTRY NtGdiExtFloodFill(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor, _In_ UINT iFillType)

Referenced by ExtFloodFill(), and FloodFill().

◆ FillRgn()

BOOL WINAPI FillRgn ( _In_ HDC  hdc,
_In_ HRGN  hrgn,
_In_ HBRUSH  hbr 
)

Definition at line 183 of file painting.c.

187{
188
189 if ((hrgn == NULL) || (hbr == NULL))
190 return FALSE;
191
193
194 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
195
196 return NtGdiFillRgn(hdc, hrgn, hbr);
197}
static HRGN hrgn
BOOL WINAPI FillRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbr)
Definition: painting.c:183
__kernel_entry W32KAPI BOOL APIENTRY NtGdiFillRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbrush)
Definition: bitblt.c:1299

Referenced by FillRgn(), HEADER_DrawItem(), OnPaint(), CardWindow::PaintCardRgn(), CUIFBalloonWindow::PaintFrameProc(), PaintRgn(), PlayEnhMetaFileRecord(), PlayMetaFileRecord(), print_preview(), Test_FrameRgn(), TOOLTIPS_Refresh(), and visualize_region_differences().

◆ FloodFill()

BOOL WINAPI FloodFill ( _In_ HDC  hdc,
_In_ INT  xStart,
_In_ INT  yStart,
_In_ COLORREF  crFill 
)

Definition at line 497 of file painting.c.

502{
503 return ExtFloodFill(hdc, xStart, yStart, crFill, FLOODFILLBORDER);
504}
#define FLOODFILLBORDER
Definition: wingdi.h:644

◆ FrameRgn()

BOOL WINAPI FrameRgn ( _In_ HDC  hdc,
_In_ HRGN  hrgn,
_In_ HBRUSH  hbr,
_In_ INT  nWidth,
_In_ INT  nHeight 
)

Definition at line 205 of file painting.c.

211{
212
213 if ((hrgn == NULL) || (hbr == NULL))
214 return FALSE;
215
216 HANDLE_METADC(BOOL, FrameRgn, FALSE, hdc, hrgn, hbr, nWidth, nHeight);
217
218 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
219
220 return NtGdiFrameRgn(hdc, hrgn, hbr, nWidth, nHeight);
221}
BOOL WINAPI FrameRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbr, _In_ INT nWidth, _In_ INT nHeight)
Definition: painting.c:205
__kernel_entry W32KAPI BOOL APIENTRY NtGdiFrameRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbrush, _In_ INT xWidth, _In_ INT yHeight)
Definition: bitblt.c:1356

Referenced by FrameRgn().

◆ GdiAlphaBlend()

BOOL WINAPI GdiAlphaBlend ( _In_ HDC  hdcDst,
_In_ INT  xDst,
_In_ INT  yDst,
_In_ INT  cxDst,
_In_ INT  cyDst,
_In_ HDC  hdcSrc,
_In_ INT  xSrc,
_In_ INT  ySrc,
_In_ INT  cxSrc,
_In_ INT  cySrc,
_In_ BLENDFUNCTION  blendfn 
)

Definition at line 833 of file painting.c.

845{
846 if (hdcSrc == NULL ) return FALSE;
847
849
852 FALSE,
853 hdcDst,
854 xDst,
855 yDst,
856 cxDst,
857 cyDst,
858 hdcSrc,
859 xSrc,
860 ySrc,
861 cxSrc,
862 cySrc,
863 blendfn);
864
865 if ( GdiConvertAndCheckDC(hdcDst) == NULL ) return FALSE;
866
867 return NtGdiAlphaBlend(hdcDst,
868 xDst,
869 yDst,
870 cxDst,
871 cyDst,
872 hdcSrc,
873 xSrc,
874 ySrc,
875 cxSrc,
876 cySrc,
877 blendfn,
878 0);
879}
#define HANDLE_EMETAFDC(_RetType, _Func, dwError, hdc,...)
Definition: gdi32p.h:670
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
#define GDI_OBJECT_TYPE_METADC
Definition: gdi.h:57
__kernel_entry W32KAPI BOOL APIENTRY NtGdiAlphaBlend(_In_ HDC hdcDst, _In_ LONG DstX, _In_ LONG DstY, _In_ LONG DstCx, _In_ LONG DstCy, _In_ HDC hdcSrc, _In_ LONG SrcX, _In_ LONG SrcY, _In_ LONG SrcCx, _In_ LONG SrcCy, _In_ BLENDFUNCTION BlendFunction, _In_ HANDLE hcmXform)
#define AlphaBlend
Definition: misc.c:293
static HDC hdcDst
Definition: xlate.c:32

◆ GdiGradientFill()

BOOL WINAPI GdiGradientFill ( _In_ HDC  hdc,
_In_reads_(nVertex) PTRIVERTEX  pVertex,
_In_ ULONG  nVertex,
_In_ PVOID  pMesh,
_In_ ULONG  nCount,
_In_ ULONG  ulMode 
)

Definition at line 925 of file painting.c.

932{
934
935 HANDLE_EMETAFDC(BOOL, GradientFill, FALSE, hdc, pVertex, nVertex, pMesh, nCount, ulMode);
936
937 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
938
939 return NtGdiGradientFill(hdc, pVertex, nVertex, pMesh, nCount, ulMode);
940}
#define TRUE
Definition: types.h:120
@ GDILoObjType_LO_METADC16_TYPE
Definition: gdi_private.h:49
__kernel_entry W32KAPI BOOL APIENTRY NtGdiGradientFill(_In_ HDC hdc, _In_ PTRIVERTEX pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nMesh, _In_ ULONG ulMode)
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID pMesh
Definition: winddi.h:3653
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG nVertex
Definition: winddi.h:3652
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL _In_ ULONG ulMode
Definition: winddi.h:3657
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX * pVertex
Definition: winddi.h:3651

◆ GdiTransparentBlt()

BOOL WINAPI GdiTransparentBlt ( _In_ HDC  hdcDst,
_In_ INT  xDst,
_In_ INT  yDst,
_In_ INT  cxDst,
_In_ INT  cyDst,
_In_ HDC  hdcSrc,
_In_ INT  xSrc,
_In_ INT  ySrc,
_In_ INT  cxSrc,
_In_ INT  cySrc,
_In_ UINT  crTransparent 
)

Definition at line 887 of file painting.c.

899{
902 FALSE,
903 hdcDst,
904 xDst,
905 yDst,
906 cxDst,
907 cyDst,
908 hdcSrc,
909 xSrc,
910 ySrc,
911 cxSrc,
912 cySrc,
913 crTransparent);
914
915 if ( GdiConvertAndCheckDC(hdcDst) == NULL ) return FALSE;
916
917 return NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, crTransparent);
918}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiTransparentBlt(_In_ HDC hdcDst, _In_ INT xDst, _In_ INT yDst, _In_ INT cxDst, _In_ INT cyDst, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ COLORREF TransColor)
#define TransparentBlt
Definition: misc.c:292

◆ GetPixel()

COLORREF WINAPI GetPixel ( _In_ HDC  hdc,
_In_ INT  x,
_In_ INT  y 
)

Definition at line 133 of file painting.c.

137{
140 return NtGdiGetPixel(hdc, x, y);
141}
BOOL WINAPI GdiValidateHandle(HGDIOBJ)
Definition: misc.c:712
#define GDI_OBJECT_TYPE_DC
Definition: gdi.h:46
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
__kernel_entry W32KAPI DWORD APIENTRY NtGdiGetPixel(_In_ HDC hdc, _In_ INT x, _In_ INT y)
Definition: bitblt.c:1515

◆ InvertRgn()

BOOL WINAPI InvertRgn ( _In_ HDC  hdc,
_In_ HRGN  hrgn 
)

Definition at line 229 of file painting.c.

232{
233
234 if (hrgn == NULL)
235 return FALSE;
236
238
239 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
240
241 return NtGdiInvertRgn(hdc, hrgn);
242}
BOOL WINAPI InvertRgn(_In_ HDC hdc, _In_ HRGN hrgn)
Definition: painting.c:229
__kernel_entry W32KAPI BOOL APIENTRY NtGdiInvertRgn(_In_ HDC hdc, _In_ HRGN hrgn)
Definition: bitblt.c:1380

Referenced by InvertRgn(), PaintSelectionRect(), PlayEnhMetaFileRecord(), and PlayMetaFileRecord().

◆ LineTo()

BOOL WINAPI LineTo ( _In_ HDC  hdc,
_In_ INT  x,
_In_ INT  y 
)

Definition at line 9 of file painting.c.

13{
15
16 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
17
18 return NtGdiLineTo(hdc, x, y);
19}
BOOL WINAPI LineTo(_In_ HDC hdc, _In_ INT x, _In_ INT y)
Definition: painting.c:9
__kernel_entry W32KAPI BOOL APIENTRY NtGdiLineTo(_In_ HDC hdc, _In_ INT x, _In_ INT y)

Referenced by LineTo(), and PolyBezierTo().

◆ MaskBlt()

BOOL WINAPI MaskBlt ( _In_ HDC  hdcDest,
_In_ INT  xDest,
_In_ INT  yDest,
_In_ INT  cx,
_In_ INT  cy,
_In_ HDC  hdcSrc,
_In_ INT  xSrc,
_In_ INT  ySrc,
_In_ HBITMAP  hbmMask,
_In_ INT  xMask,
_In_ INT  yMask,
_In_ DWORD  dwRop 
)

Definition at line 737 of file painting.c.

750{
752 MaskBlt,
753 FALSE,
754 hdcDest,
755 xDest,
756 yDest,
757 cx,
758 cy,
759 hdcSrc,
760 xSrc,
761 ySrc,
762 hbmMask,
763 xMask,
764 yMask,
765 dwRop);
766
767 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
768
769 return NtGdiMaskBlt(hdcDest,
770 xDest,
771 yDest,
772 cx,
773 cy,
774 hdcSrc,
775 xSrc,
776 ySrc,
777 hbmMask,
778 xMask,
779 yMask,
780 dwRop,
782}
BOOL WINAPI MaskBlt(_In_ HDC hdcDest, _In_ INT xDest, _In_ INT yDest, _In_ INT cx, _In_ INT cy, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ HBITMAP hbmMask, _In_ INT xMask, _In_ INT yMask, _In_ DWORD dwRop)
Definition: painting.c:737
__kernel_entry W32KAPI BOOL APIENTRY NtGdiMaskBlt(_In_ HDC hdc, _In_ INT xDst, _In_ INT yDst, _In_ INT cx, _In_ INT cy, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_opt_ HBITMAP hbmMask, _In_ INT xMask, _In_ INT yMask, _In_ DWORD dwRop4, _In_ DWORD crBackColor)

Referenced by MaskBlt().

◆ MoveToEx()

BOOL WINAPI MoveToEx ( _In_ HDC  hdc,
_In_ INT  x,
_In_ INT  y,
_Out_opt_ LPPOINT  ppt 
)

Definition at line 24 of file painting.c.

29{
30 PDC_ATTR pdcattr;
31
32 HANDLE_METADC(BOOL, MoveTo, FALSE, hdc, x, y);
33
34 /* Get the DC attribute */
35 pdcattr = GdiGetDcAttr(hdc);
36 if (pdcattr == NULL)
37 {
39 return FALSE;
40 }
41
42 if (ppt)
43 {
44 if ( pdcattr->ulDirty_ & DIRTY_PTLCURRENT ) // Double hit!
45 {
46 ppt->x = pdcattr->ptfxCurrent.x; // ret prev before change.
47 ppt->y = pdcattr->ptfxCurrent.y;
48 DPtoLP (hdc, ppt, 1); // reconvert back.
49 }
50 else
51 {
52 ppt->x = pdcattr->ptlCurrent.x;
53 ppt->y = pdcattr->ptlCurrent.y;
54 }
55 }
56
57 pdcattr->ptlCurrent.x = x;
58 pdcattr->ptlCurrent.y = y;
59
60 pdcattr->ulDirty_ &= ~DIRTY_PTLCURRENT;
61 pdcattr->ulDirty_ |= ( DIRTY_PTFXCURRENT|DIRTY_STYLESTATE); // Set dirty
62 return TRUE;
63}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
FORCEINLINE PDC_ATTR GdiGetDcAttr(HDC hdc)
Definition: gdi32p.h:477
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:131
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:133
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:132
POINTL ptlCurrent
Definition: ntgdihdl.h:311
ULONG ulDirty_
Definition: ntgdihdl.h:294
POINTL ptfxCurrent
Definition: ntgdihdl.h:312
LONG y
Definition: windef.h:130
LONG x
Definition: windef.h:129
BOOL WINAPI DPtoLP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)

◆ PaintRgn()

BOOL WINAPI PaintRgn ( _In_ HDC  hdc,
_In_ HRGN  hrgn 
)

Definition at line 250 of file painting.c.

253{
255}
#define OBJ_BRUSH
Definition: objidl.idl:1015
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428

Referenced by draw_graphics(), PlayEnhMetaFileRecord(), PlayMetaFileRecord(), and Test_PaintRgn().

◆ PatBlt()

BOOL WINAPI PatBlt ( _In_ HDC  hdc,
_In_ INT  nXLeft,
_In_ INT  nYLeft,
_In_ INT  nWidth,
_In_ INT  nHeight,
_In_ DWORD  dwRop 
)

Definition at line 549 of file painting.c.

556{
557 PDC_ATTR pdcattr;
558
559 HANDLE_EMETAFDC(BOOL, PatBlt, FALSE, hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
560
561 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
562
563 /* Get the DC attribute */
564 pdcattr = GdiGetDcAttr(hdc);
565 if (pdcattr && !(pdcattr->ulDirty_ & DC_DIBSECTION))
566 {
567 PGDIBSPATBLT pgO;
568
570 if (pgO)
571 {
572 pdcattr->ulDirty_ |= DC_MODE_DIRTY;
573 pgO->nXLeft = nXLeft;
574 pgO->nYLeft = nYLeft;
575 pgO->nWidth = nWidth;
576 pgO->nHeight = nHeight;
577 pgO->dwRop = dwRop;
578 /* Snapshot attributes */
579 pgO->hbrush = pdcattr->hbrush;
580 pgO->crForegroundClr = pdcattr->crForegroundClr;
581 pgO->crBackgroundClr = pdcattr->crBackgroundClr;
582 pgO->crBrushClr = pdcattr->crBrushClr;
583 pgO->ulForegroundClr = pdcattr->ulForegroundClr;
584 pgO->ulBackgroundClr = pdcattr->ulBackgroundClr;
585 pgO->ulBrushClr = pdcattr->ulBrushClr;
586 return TRUE;
587 }
588 }
589 return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
590}
FORCEINLINE PVOID GdiAllocBatchCommand(HDC hdc, USHORT Cmd)
Definition: gdi32p.h:407
#define DC_DIBSECTION
Definition: ntgdihdl.h:137
#define DC_MODE_DIRTY
Definition: ntgdihdl.h:144
@ GdiBCPatBlt
Definition: ntgdityp.h:86
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPatBlt(_In_ HDC hdcDest, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_ DWORD dwRop)
Definition: bitblt.c:988
HANDLE hbrush
Definition: ntgdihdl.h:295
ULONG ulBrushClr
Definition: ntgdihdl.h:302
ULONG ulBackgroundClr
Definition: ntgdihdl.h:298
COLORREF crBrushClr
Definition: ntgdihdl.h:301
ULONG ulForegroundClr
Definition: ntgdihdl.h:300
COLORREF crForegroundClr
Definition: ntgdihdl.h:299
COLORREF crBackgroundClr
Definition: ntgdihdl.h:297
ULONG ulBrushClr
Definition: ntgdityp.h:478
COLORREF crBackgroundClr
Definition: ntgdityp.h:472
ULONG ulForegroundClr
Definition: ntgdityp.h:476
COLORREF crBrushClr
Definition: ntgdityp.h:473
COLORREF crForegroundClr
Definition: ntgdityp.h:471
DWORD dwRop
Definition: ntgdityp.h:470
ULONG ulBackgroundClr
Definition: ntgdityp.h:477
HANDLE hbrush
Definition: ntgdityp.h:469

Referenced by BitBlt(), PatBlt(), and PolyPatBlt().

◆ PlgBlt()

BOOL WINAPI PlgBlt ( _In_ HDC  hdcDest,
_In_reads_(3) const POINT ppt,
_In_ HDC  hdcSrc,
_In_ INT  xSrc,
_In_ INT  ySrc,
_In_ INT  cx,
_In_ INT  cy,
_In_opt_ HBITMAP  hbmMask,
_In_ INT  xMask,
_In_ INT  yMask 
)

Definition at line 790 of file painting.c.

801{
803 PlgBlt,
804 FALSE,
805 hdcDest,
806 ppt,
807 hdcSrc,
808 xSrc,
809 ySrc,
810 cx,
811 cy,
812 hbmMask,
813 xMask,
814 yMask);
815
816 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
817
818 return NtGdiPlgBlt(hdcDest,
819 (LPPOINT)ppt,
820 hdcSrc,
821 xSrc,
822 ySrc,
823 cx,
824 cy,
825 hbmMask,
826 xMask,
827 yMask,
829}
BOOL WINAPI PlgBlt(_In_ HDC hdcDest, _In_reads_(3) const POINT *ppt, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cx, _In_ INT cy, _In_opt_ HBITMAP hbmMask, _In_ INT xMask, _In_ INT yMask)
Definition: painting.c:790
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPlgBlt(_In_ HDC hdcTrg, _In_reads_(3) LPPOINT pptlTrg, _In_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_opt_ HBITMAP hbmMask, _In_ INT xMask, _In_ INT yMask, _In_ DWORD crBackColor)

Referenced by PlgBlt().

◆ PolyBezier()

BOOL WINAPI PolyBezier ( _In_ HDC  hdc,
_In_reads_(cpt) const POINT apt,
_In_ DWORD  cpt 
)

Definition at line 263 of file painting.c.

267{
269
270 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
271
272 return NtGdiPolyPolyDraw(hdc ,(PPOINT)apt, &cpt, 1, GdiPolyBezier);
273}
BOOL WINAPI PolyBezier(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:263
@ GdiPolyBezier
Definition: ntgdityp.h:40
__kernel_entry W32KAPI ULONG_PTR APIENTRY NtGdiPolyPolyDraw(_In_ HDC hdc, _In_ PPOINT ppt, _In_reads_(ccpt) PULONG pcpt, _In_ ULONG ccpt, _In_ INT iFunc)

Referenced by Bezier(), DrawPrimitive(), PlayEnhMetaFileRecord(), PolyBezier(), test_all_functions(), test_emf_polybezier(), and test_enhmetafile_file().

◆ PolyBezierTo()

BOOL WINAPI PolyBezierTo ( _In_ HDC  hdc,
_In_reads_(cpt) const POINT apt,
_In_ DWORD  cpt 
)

Definition at line 281 of file painting.c.

285{
286 POINT pt1 = { 0, 0 };
287 BOOL ret = FALSE;
288
290
291 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
292
293 /* This section of code is just an optimization so we can do an early return.
294 * Everything would work the same even if this code were removed. */
295 if (cpt == 3)
296 {
297 /* If there are exactly 3 points, see if all three points of
298 * the PolyBezierTo are equal. */
299 if (apt[0].x == apt[1].x && apt[1].x == apt[2].x &&
300 apt[0].y == apt[1].y && apt[1].y == apt[2].y)
301 {
302 /* If all points are equal and they equal the start point,
303 * then we can just return TRUE as an optimization. */
304 if (GetCurrentPositionEx(hdc, &pt1) &&
305 pt1.x == apt[0].x && pt1.y == apt[0].y)
306 {
307 return TRUE;
308 }
309 /* If they are all equal, but not equal to the start point,
310 * then we can just do a LineTo and return as an optimization. */
311 return LineTo(hdc, apt[0].x, apt[0].y);
312 }
313 }
314
315 /* Following based on Wine 10.0 nulldrv_PolyBezierTo function */
316 POINT *pts = HeapAlloc(GetProcessHeap(), 0, (cpt + 1) * sizeof(*apt));
317 if (!pts)
318 {
320 return FALSE;
321 }
322
323 if (GetCurrentPositionEx(hdc, &pt1))
324 {
325 pts[0] = pt1;
326 memcpy(&pts[1], apt, sizeof(*apt) * cpt);
327 cpt++;
329 }
330
331 HeapFree(GetProcessHeap(), 0, pts);
332
333 return ret;
334}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
return ret
Definition: mutex.c:146
BOOL WINAPI PolyBezierTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:281
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
@ GdiPolyBezierTo
Definition: ntgdityp.h:42
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
BOOL WINAPI GetCurrentPositionEx(_In_ HDC, _Out_ LPPOINT)
Definition: coord.c:241

Referenced by MainWndProc(), PlayEnhMetaFileRecord(), PolyBezierTo(), test_all_functions(), test_emf_polybezier(), and test_enhmetafile_file().

◆ PolyDraw()

BOOL WINAPI PolyDraw ( _In_ HDC  hdc,
_In_reads_(cpt) const POINT apt,
_In_reads_(cpt) const BYTE aj,
_In_ INT  cpt 
)

Definition at line 342 of file painting.c.

347{
348 HANDLE_EMETAFDC(BOOL, PolyDraw, FALSE, hdc, apt, aj, cpt);
349
350 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
351
352 return NtGdiPolyDraw(hdc, (PPOINT)apt, (PBYTE)aj, cpt);
353}
BOOL WINAPI PolyDraw(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_reads_(cpt) const BYTE *aj, _In_ INT cpt)
Definition: painting.c:342
BYTE * PBYTE
Definition: pedump.c:66
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPolyDraw(_In_ HDC hdc, _In_reads_(cpt) LPPOINT ppt, _In_reads_(cpt) LPBYTE pjAttr, _In_ ULONG cpt)
Definition: line.c:687

Referenced by PolyDraw().

◆ Polygon()

BOOL WINAPI Polygon ( _In_ HDC  hdc,
_In_reads_(cpt) const POINT apt,
_In_ INT  cpt 
)

Definition at line 361 of file painting.c.

365{
366 HANDLE_METADC(BOOL, Polygon, FALSE, hdc, apt, cpt);
367
368 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
369
370 return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, (PULONG)&cpt, 1, GdiPolyPolygon);
371}
BOOL WINAPI Polygon(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ INT cpt)
Definition: painting.c:361
@ GdiPolyPolygon
Definition: ntgdityp.h:38
uint32_t * PULONG
Definition: typedefs.h:59

Referenced by Polygon().

◆ Polyline()

BOOL WINAPI Polyline ( _In_ HDC  hdc,
_In_reads_(cpt) const POINT apt,
_In_ INT  cpt 
)

Definition at line 379 of file painting.c.

383{
384 HANDLE_METADC(BOOL, Polyline, FALSE, hdc, apt, cpt);
385
386 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
387
388 return NtGdiPolyPolyDraw(hdc, (PPOINT)apt, (PULONG)&cpt, 1, GdiPolyPolyLine);
389}
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ INT cpt)
Definition: painting.c:379
@ GdiPolyPolyLine
Definition: ntgdityp.h:39

Referenced by Polyline().

◆ PolylineTo()

BOOL WINAPI PolylineTo ( _In_ HDC  hdc,
_In_reads_(cpt) const POINT apt,
_In_ DWORD  cpt 
)

Definition at line 397 of file painting.c.

401{
402 POINT pt1 = { 0, 0 };
403 BOOL ret = FALSE;
404
406
407 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
408
409 /* Following based on Wine 10.0 nulldrv_PolylineTo function */
410 POINT *pts = HeapAlloc(GetProcessHeap(), 0, (cpt + 1) * sizeof(*apt));
411 if (!pts)
412 {
414 return FALSE;
415 }
416
417 if (GetCurrentPositionEx(hdc, &pt1))
418 {
419 pts[0] = pt1;
420 memcpy(&pts[1], apt, sizeof(*apt) * cpt);
421 cpt++;
422 ret = NtGdiPolyPolyDraw(hdc, (PPOINT)pts, &cpt, 1, GdiPolyLineTo);
423 }
424
425 HeapFree(GetProcessHeap(), 0, pts);
426
427 return ret;
428}
BOOL WINAPI PolylineTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:397
@ GdiPolyLineTo
Definition: ntgdityp.h:41

Referenced by PlayEnhMetaFileRecord(), PolylineTo(), test_all_functions(), and test_emf_paths().

◆ PolyPatBlt()

BOOL WINAPI PolyPatBlt ( _In_ HDC  hdc,
_In_ DWORD  dwRop,
_In_ PPOLYPATBLT  pPoly,
_In_ DWORD  nCount,
_In_ DWORD  dwMode 
)

Definition at line 594 of file painting.c.

600{
601 UINT i;
602 BOOL bResult;
603 HBRUSH hbrOld;
604 PDC_ATTR pdcattr;
605
606 /* Handle meta DCs */
609 {
611 {
612 return FALSE;
613 }
614
615 /* Save the current DC brush */
616 hbrOld = SelectObject(hdc, GetStockObject(DC_BRUSH));
617
618 /* Assume success */
619 bResult = TRUE;
620
621 /* Loop all rect */
622 for (i = 0; i < nCount; i++)
623 {
624 /* Select the brush for this rect */
625 SelectObject(hdc, pPoly[i].hBrush);
626
627 /* Do the PatBlt operation for this rect */
628 bResult &= PatBlt(hdc,
629 pPoly[i].nXLeft,
630 pPoly[i].nYLeft,
631 pPoly[i].nWidth,
632 pPoly[i].nHeight,
633 dwRop);
634 }
635
636 /* Restore the old brush */
637 SelectObject(hdc, hbrOld);
638
639 return bResult;
640 }
641
642 /* Get the DC attribute */
643 pdcattr = GdiGetDcAttr(hdc);
644 if (nCount && pdcattr && !(pdcattr->ulDirty_ & DC_DIBSECTION))
645 {
646 PGDIBSPPATBLT pgO;
647 PTEB pTeb = NtCurrentTeb();
648
650 if (pgO)
651 {
652 USHORT cjSize = 0;
653 if (nCount > 1) cjSize = (nCount-1) * sizeof(PATRECT);
654
655 if ((pTeb->GdiTebBatch.Offset + cjSize) <= GDIBATCHBUFSIZE)
656 {
657 pdcattr->ulDirty_ |= DC_MODE_DIRTY;
658 pgO->Count = nCount;
659 pgO->Mode = dwMode;
660 pgO->rop4 = dwRop;
661 /* Snapshot attributes */
662 pgO->crForegroundClr = pdcattr->crForegroundClr;
663 pgO->crBackgroundClr = pdcattr->crBackgroundClr;
664 pgO->crBrushClr = pdcattr->crBrushClr;
665 pgO->ulForegroundClr = pdcattr->ulForegroundClr;
666 pgO->ulBackgroundClr = pdcattr->ulBackgroundClr;
667 pgO->ulBrushClr = pdcattr->ulBrushClr;
668 RtlCopyMemory(pgO->pRect, pPoly, nCount * sizeof(PATRECT));
669 // Recompute offset and return size, remember one is already accounted for in the structure.
670 pTeb->GdiTebBatch.Offset += cjSize;
671 ((PGDIBATCHHDR)pgO)->Size += cjSize;
672 return TRUE;
673 }
674 // Reset offset and count then fall through
675 pTeb->GdiTebBatch.Offset -= sizeof(GDIBSPPATBLT);
676 pTeb->GdiBatchCount--;
677 }
678 }
679 return NtGdiPolyPatBlt(hdc, dwRop, pPoly, nCount, dwMode);
680}
@ GDILoObjType_LO_ALTDC_TYPE
Definition: gdi_private.h:43
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
#define NtCurrentTeb
unsigned int UINT
Definition: ndis.h:50
#define GDIBATCHBUFSIZE
Definition: ntgdityp.h:200
struct _GDIBATCHHDR * PGDIBATCHHDR
struct _GDIBSPPATBLT GDIBSPPATBLT
@ GdiBCPolyPatBlt
Definition: ntgdityp.h:87
unsigned short USHORT
Definition: pedump.c:61
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPolyPatBlt(_In_ HDC hdc, _In_ DWORD rop4, _In_reads_(cPoly) PPOLYPATBLT pPoly, _In_ DWORD cPoly, _In_ DWORD dwMode)
DWORD rop4
Definition: ntgdityp.h:491
ULONG ulForegroundClr
Definition: ntgdityp.h:497
ULONG ulBackgroundClr
Definition: ntgdityp.h:498
ULONG ulBrushClr
Definition: ntgdityp.h:499
COLORREF crForegroundClr
Definition: ntgdityp.h:494
PATRECT pRect[1]
Definition: ntgdityp.h:501
DWORD Count
Definition: ntgdityp.h:493
DWORD Mode
Definition: ntgdityp.h:492
COLORREF crBackgroundClr
Definition: ntgdityp.h:495
COLORREF crBrushClr
Definition: ntgdityp.h:496
ULONG Offset
Definition: compat.h:831
Definition: compat.h:836
GDI_TEB_BATCH GdiTebBatch
Definition: compat.h:857
ULONG GdiBatchCount
Definition: compat.h:887
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_In_ ULONG cjSize
Definition: winddi.h:3634
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546

◆ PolyPolygon()

BOOL WINAPI PolyPolygon ( _In_ HDC  hdc,
_In_ const POINT apt,
_In_reads_(csz) const INT asz,
_In_ INT  csz 
)

Definition at line 436 of file painting.c.

441{
442 HANDLE_METADC(BOOL, PolyPolygon, FALSE, hdc, apt, asz, csz);
443
444 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
445
446 return NtGdiPolyPolyDraw(hdc, (PPOINT)apt, (PULONG)asz, csz, GdiPolyPolygon);
447}
BOOL WINAPI PolyPolygon(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const INT *asz, _In_ INT csz)
Definition: painting.c:436

Referenced by PolyPolygon().

◆ PolyPolyline()

BOOL WINAPI PolyPolyline ( _In_ HDC  hdc,
_In_ CONST POINT apt,
_In_reads_(csz) CONST DWORD asz,
_In_ DWORD  csz 
)

Definition at line 455 of file painting.c.

460{
462 return FALSE;
463
464 HANDLE_EMETAFDC(BOOL, PolyPolyline, FALSE, hdc, apt, asz, csz);
465
466 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
467
468 return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, (PULONG)asz, csz, GdiPolyPolyLine);
469}
BOOL WINAPI PolyPolyline(_In_ HDC hdc, _In_ CONST POINT *apt, _In_reads_(csz) CONST DWORD *asz, _In_ DWORD csz)
Definition: painting.c:455

Referenced by PolyPolyline().

◆ Rectangle()

BOOL WINAPI Rectangle ( _In_ HDC  hdc,
_In_ INT  left,
_In_ INT  top,
_In_ INT  right,
_In_ INT  bottom 
)

Definition at line 91 of file painting.c.

97{
99
100 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
101
103}
BOOL WINAPI Rectangle(_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom)
Definition: painting.c:91
__kernel_entry W32KAPI BOOL APIENTRY NtGdiRectangle(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)

Referenced by Rectangle().

◆ RoundRect()

BOOL WINAPI RoundRect ( _In_ HDC  hdc,
_In_ INT  left,
_In_ INT  top,
_In_ INT  right,
_In_ INT  bottom,
_In_ INT  width,
_In_ INT  height 
)

Definition at line 111 of file painting.c.

119{
121
122 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
123
125}
BOOL WINAPI RoundRect(_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom, _In_ INT width, _In_ INT height)
Definition: painting.c:111
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
__kernel_entry W32KAPI BOOL APIENTRY NtGdiRoundRect(_In_ HDC hdc, _In_ INT x1, _In_ INT y1, _In_ INT x2, _In_ INT y2, _In_ INT x3, _In_ INT y3)

Referenced by RoundRect().

◆ SetPixel()

COLORREF WINAPI SetPixel ( _In_ HDC  hdc,
_In_ INT  x,
_In_ INT  y,
_In_ COLORREF  crColor 
)

Definition at line 149 of file painting.c.

154{
156
157 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
158
159 return NtGdiSetPixel(hdc, x, y, crColor);
160}
COLORREF WINAPI SetPixel(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
Definition: painting.c:149
__kernel_entry W32KAPI COLORREF APIENTRY NtGdiSetPixel(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
Definition: bitblt.c:1427
DWORD COLORREF
Definition: windef.h:100

Referenced by SetPixel(), and SetPixelV().

◆ SetPixelV()

BOOL WINAPI SetPixelV ( _In_ HDC  hdc,
_In_ INT  x,
_In_ INT  y,
_In_ COLORREF  crColor 
)

Definition at line 168 of file painting.c.

173{
174 return SetPixel(hdc, x, y, crColor) != CLR_INVALID;
175}

◆ StretchBlt()

BOOL WINAPI StretchBlt ( _In_ HDC  hdcDest,
_In_ INT  xDest,
_In_ INT  yDest,
_In_ INT  cxDest,
_In_ INT  cyDest,
_In_opt_ HDC  hdcSrc,
_In_ INT  xSrc,
_In_ INT  ySrc,
_In_ INT  cxSrc,
_In_ INT  cySrc,
_In_ DWORD  dwRop 
)

Definition at line 687 of file painting.c.

699{
702 FALSE,
703 hdcDest,
704 xDest,
705 yDest,
706 cxDest,
707 cyDest,
708 hdcSrc,
709 xSrc,
710 ySrc,
711 cxSrc,
712 cySrc,
713 dwRop);
714
715 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
716
717 return NtGdiStretchBlt(hdcDest,
718 xDest,
719 yDest,
720 cxDest,
721 cyDest,
722 hdcSrc,
723 xSrc,
724 ySrc,
725 cxSrc,
726 cySrc,
727 dwRop,
729}
BOOL WINAPI StretchBlt(_In_ HDC hdcDest, _In_ INT xDest, _In_ INT yDest, _In_ INT cxDest, _In_ INT cyDest, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ DWORD dwRop)
Definition: painting.c:687
__kernel_entry W32KAPI BOOL APIENTRY NtGdiStretchBlt(_In_ HDC hdcDst, _In_ INT xDst, _In_ INT yDst, _In_ INT cxDst, _In_ INT cyDst, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ DWORD dwRop, _In_ DWORD dwBackColor)

Referenced by StretchBlt().