#include <precomp.h>
#include <debug.h>
Go to the source code of this file.
|
HPEN APIENTRY | ExtCreatePen (DWORD dwPenStyle, DWORD dwWidth, CONST LOGBRUSH *lplb, DWORD dwStyleCount, CONST DWORD *lpStyle) |
|
HBRUSH WINAPI | CreateDIBPatternBrush (HGLOBAL hglbDIBPacked, UINT fuColorSpec) |
|
HBRUSH WINAPI | CreateDIBPatternBrushPt (CONST VOID *lpPackedDIB, UINT fuColorSpec) |
|
HBRUSH WINAPI | CreateHatchBrush (INT fnStyle, COLORREF clrref) |
|
HBRUSH WINAPI | CreatePatternBrush (HBITMAP hbmp) |
|
HBRUSH WINAPI | CreateSolidBrush (IN COLORREF crColor) |
|
HBRUSH WINAPI | CreateBrushIndirect (CONST LOGBRUSH *LogBrush) |
|
BOOL WINAPI | GetBrushOrgEx (HDC hdc, LPPOINT pt) |
|
BOOL WINAPI | SetBrushOrgEx (HDC hdc, int nXOrg, int nYOrg, LPPOINT lppt) |
|
DWORD WINAPI | GetBrushAttributes (HBRUSH hbr) |
|
HBRUSH WINAPI | SetBrushAttributes (HBRUSH hbm, DWORD dwFlags) |
|
HBRUSH WINAPI | ClearBrushAttributes (HBRUSH hbm, DWORD dwFlags) |
|
BOOL WINAPI | UnrealizeObject (HGDIOBJ hgdiobj) |
|
◆ NDEBUG
◆ ClearBrushAttributes()
HBRUSH WINAPI ClearBrushAttributes |
( |
HBRUSH |
hbm, |
|
|
DWORD |
dwFlags |
|
) |
| |
Definition at line 375 of file brush.c.
376{
378 {
380 }
382}
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiClearBrushAttributes(_In_ HBRUSH hbm, _In_ DWORD dwFlags)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
◆ CreateBrushIndirect()
Definition at line 206 of file brush.c.
208{
209 HBRUSH hBrush;
210
211 switch (LogBrush->lbStyle)
212 {
215 LogBrush->lbColor);
216 break;
217
220 LogBrush->lbColor);
221 break;
222
227 break;
228
233 break;
234
236
237
239 break;
240
243 LogBrush->lbColor,
245 break;
246
249 break;
250
251 default:
254 break;
255 }
256
257 return hBrush;
258}
#define ERROR_INVALID_PARAMETER
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiGetStockObject(_In_ INT iObject)
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiCreateHatchBrushInternal(_In_ ULONG ulStyle, _In_ COLORREF clrr, _In_ BOOL bPen)
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiCreateSolidBrush(_In_ COLORREF cr, _In_opt_ HBRUSH hbr)
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiCreatePatternBrushInternal(_In_ HBITMAP hbm, _In_ BOOL bPen, _In_ BOOL b8X8)
HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL hglbDIBPacked, UINT fuColorSpec)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
◆ CreateDIBPatternBrush()
Definition at line 114 of file brush.c.
117{
119 HBRUSH hBrush =
NULL;
121 UINT ConvertedInfoSize;
122
124 if (lpPackedDIB ==
NULL)
125 return 0;
126
128 &ConvertedInfoSize,
TRUE);
129 if (pConvertedInfo)
130 {
132 ConvertedInfoSize,
FALSE,
FALSE, lpPackedDIB);
134 RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
135 }
136
138
139 return hBrush;
140}
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
LPBITMAPINFO WINAPI ConvertBitmapInfo(CONST BITMAPINFO *BitmapInfo, UINT ColorSpec, UINT *BitmapInfoSize, BOOL FollowedByData)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiCreateDIBBrush(_In_reads_bytes_(cj) PVOID pv, _In_ FLONG fl, _In_ UINT cj, _In_ BOOL b8X8, _In_ BOOL bPen, _In_ PVOID pClient)
Referenced by CreateBrushIndirect().
◆ CreateDIBPatternBrushPt()
Definition at line 146 of file brush.c.
149{
150 HBRUSH hBrush =
NULL;
152 UINT ConvertedInfoSize;
153
154 if (lpPackedDIB ==
NULL)
155 return 0;
156
158 &ConvertedInfoSize,
TRUE);
159 if (pConvertedInfo)
160 {
164 RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
165 }
166
167 return hBrush;
168}
◆ CreateHatchBrush()
◆ CreatePatternBrush()
◆ CreateSolidBrush()
◆ ExtCreatePen()
Definition at line 13 of file brush.c.
18{
22 UINT ConvertedInfoSize = 0, lbStyle;
24
26 {
27 if(!lpStyle)
28 {
30 return 0;
31 }
32 }
35 {
37 return 0;
38 }
41 {
43 return 0;
44 }
45 else
46 {
47 if (dwStyleCount || lpStyle)
48 {
50 return 0;
51 }
52 }
53
54 lbStyle = lplb->lbStyle;
55
57 {
59 {
61 if (!pConvertedInfo)
return 0;
62 }
63 else
64 {
66 {
68 {
71 if (lpPackedDIB ==
NULL)
return 0;
72 }
74 lplb->lbColor,
75 &ConvertedInfoSize,
78 }
79 else
81 }
82 }
83 else
85
86
89 lbStyle,
90 lplb->lbColor,
91 lplb->lbHatch,
93 dwStyleCount,
95 ConvertedInfoSize,
98
99
101
102 if (Hit)
103 {
105 RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
106 }
107 return hPen;
108}
static const WCHAR dwWidth[]
__kernel_entry W32KAPI HPEN APIENTRY NtGdiExtCreatePen(_In_ ULONG flPenStyle, _In_ ULONG ulWidth, _In_ ULONG iBrushStyle, _In_ ULONG ulColor, _In_ ULONG_PTR lClientHatch, _In_ ULONG_PTR lHatch, _In_ ULONG cstyle, _In_reads_opt_(cstyle) PULONG pulStyle, _In_ ULONG cjDIB, _In_ BOOL bOldStylePen, _In_opt_ HBRUSH hbrush)
struct tagBITMAPINFO * PBITMAPINFO
◆ GetBrushAttributes()
Definition at line 347 of file brush.c.
348{
350 {
352 }
353 return 0;
354}
#define GDI_HANDLE_IS_STOCKOBJ(h)
◆ GetBrushOrgEx()
Definition at line 266 of file brush.c.
267{
269
272 {
273 pt->x = Dc_Attr->ptlBrushOrigin.x;
274 pt->y = Dc_Attr->ptlBrushOrigin.y;
275 }
277}
#define GDI_OBJECT_TYPE_DC
◆ SetBrushAttributes()
HBRUSH WINAPI SetBrushAttributes |
( |
HBRUSH |
hbm, |
|
|
DWORD |
dwFlags |
|
) |
| |
Definition at line 361 of file brush.c.
362{
364 {
366 }
368}
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiSetBrushAttributes(_In_ HBRUSH hbm, _In_ DWORD dwFlags)
◆ SetBrushOrgEx()
Definition at line 284 of file brush.c.
288{
290#if 0
291
293 {
296 {
299 }
301 {
302 return EMFDRV_SetBrushOrg(
hdc, nXOrg, nYOrg);
303 }
305 }
306#endif
308 {
310
311
312 if (lppt)
313 {
314 lppt->
x = Dc_Attr->ptlBrushOrigin.x;
315 lppt->
y = Dc_Attr->ptlBrushOrigin.y;
316 }
317
318
319 if ((nXOrg == Dc_Attr->ptlBrushOrigin.x) &&
320 (nYOrg == Dc_Attr->ptlBrushOrigin.y))
322
323
326 {
327
328 Dc_Attr->ptlBrushOrigin.x = nXOrg;
329 Dc_Attr->ptlBrushOrigin.y = nYOrg;
330
331
333
335 }
336 }
337
338
339 return NtGdiSetBrushOrg(
hdc, nXOrg, nYOrg, lppt);
340}
#define ERROR_INVALID_HANDLE
FORCEINLINE PVOID GdiAllocBatchCommand(HDC hdc, USHORT Cmd)
PLDC FASTCALL GdiGetLDC(HDC hDC)
#define GDI_HANDLE_GET_TYPE(h)
#define GDI_OBJECT_TYPE_METADC
◆ UnrealizeObject()
Definition at line 389 of file brush.c.
390{
392
393
394
395
396
397
398
399
400
401
402
403
404
406 {
408 }
409
410 return retValue;
411}
#define GDI_OBJECT_TYPE_BRUSH
__kernel_entry W32KAPI BOOL APIENTRY NtGdiUnrealizeObject(_In_ HANDLE h)