ReactOS 0.4.16-dev-257-g6aa11ac
painting.c
Go to the documentation of this file.
1#include <precomp.h>
2
3
4/*
5 * @implemented
6 */
10 _In_ HDC hdc,
11 _In_ INT x,
12 _In_ INT y )
13{
15
16 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
17
18 return NtGdiLineTo(hdc, x, y);
19}
20
21
22BOOL
25 _In_ HDC hdc,
26 _In_ INT x,
27 _In_ INT y,
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}
64
65
66/*
67 * @implemented
68 */
69BOOL
72 _In_ HDC hdc,
74 _In_ INT top,
77{
79
80 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
81
82 return NtGdiEllipse(hdc, left, top, right, bottom);
83}
84
85
86/*
87 * @implemented
88 */
89BOOL
92 _In_ HDC hdc,
94 _In_ INT top,
97{
99
100 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
101
103}
104
105
106/*
107 * @implemented
108 */
109BOOL
110WINAPI
112 _In_ HDC hdc,
113 _In_ INT left,
114 _In_ INT top,
115 _In_ INT right,
117 _In_ INT width,
119{
121
122 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
123
125}
126
127
128/*
129 * @implemented
130 */
132WINAPI
134 _In_ HDC hdc,
135 _In_ INT x,
136 _In_ INT y)
137{
140 return NtGdiGetPixel(hdc, x, y);
141}
142
143
144/*
145 * @implemented
146 */
148WINAPI
150 _In_ HDC hdc,
151 _In_ INT x,
152 _In_ INT y,
153 _In_ COLORREF crColor)
154{
156
157 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
158
159 return NtGdiSetPixel(hdc, x, y, crColor);
160}
161
162
163/*
164 * @implemented
165 */
166BOOL
167WINAPI
169 _In_ HDC hdc,
170 _In_ INT x,
171 _In_ INT y,
172 _In_ COLORREF crColor)
173{
174 return SetPixel(hdc, x, y, crColor) != CLR_INVALID;
175}
176
177
178/*
179 * @implemented
180 */
181BOOL
182WINAPI
184 _In_ HDC hdc,
185 _In_ HRGN hrgn,
186 _In_ HBRUSH hbr)
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}
198
199
200/*
201 * @implemented
202 */
203BOOL
204WINAPI
206 _In_ HDC hdc,
207 _In_ HRGN hrgn,
208 _In_ HBRUSH hbr,
209 _In_ INT nWidth,
210 _In_ INT nHeight)
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}
222
223
224/*
225 * @implemented
226 */
227BOOL
228WINAPI
230 _In_ HDC hdc,
231 _In_ HRGN hrgn)
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}
243
244
245/*
246 * @implemented
247 */
248BOOL
249WINAPI
251 _In_ HDC hdc,
252 _In_ HRGN hrgn)
253{
255}
256
257
258/*
259 * @implemented
260 */
261BOOL
262WINAPI
264 _In_ HDC hdc,
265 _In_reads_(cpt) const POINT *apt,
266 _In_ DWORD cpt)
267{
269
270 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
271
272 return NtGdiPolyPolyDraw(hdc ,(PPOINT)apt, &cpt, 1, GdiPolyBezier);
273}
274
275
276/*
277 * @implemented
278 */
279BOOL
280WINAPI
282 _In_ HDC hdc,
283 _In_reads_(cpt) const POINT *apt,
284 _In_ DWORD cpt)
285{
287
288 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
289
290 return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, &cpt, 1, GdiPolyBezierTo);
291}
292
293
294/*
295 * @implemented
296 */
297BOOL
298WINAPI
300 _In_ HDC hdc,
301 _In_reads_(cpt) const POINT *apt,
302 _In_reads_(cpt) const BYTE *aj,
303 _In_ INT cpt)
304{
305 HANDLE_EMETAFDC(BOOL, PolyDraw, FALSE, hdc, apt, aj, cpt);
306
307 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
308
309 return NtGdiPolyDraw(hdc, (PPOINT)apt, (PBYTE)aj, cpt);
310}
311
312
313/*
314 * @implemented
315 */
316BOOL
317WINAPI
319 _In_ HDC hdc,
320 _In_reads_(cpt) const POINT *apt,
321 _In_ INT cpt)
322{
323 HANDLE_METADC(BOOL, Polygon, FALSE, hdc, apt, cpt);
324
325 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
326
327 return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, (PULONG)&cpt, 1, GdiPolyPolygon);
328}
329
330
331/*
332 * @implemented
333 */
334BOOL
335WINAPI
337 _In_ HDC hdc,
338 _In_reads_(cpt) const POINT *apt,
339 _In_ INT cpt)
340{
341 HANDLE_METADC(BOOL, Polyline, FALSE, hdc, apt, cpt);
342
343 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
344
345 return NtGdiPolyPolyDraw(hdc, (PPOINT)apt, (PULONG)&cpt, 1, GdiPolyPolyLine);
346}
347
348
349/*
350 * @implemented
351 */
352BOOL
353WINAPI
355 _In_ HDC hdc,
356 _In_reads_(cpt) const POINT *apt,
357 _In_ DWORD cpt)
358{
360
361 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
362
363 return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, &cpt, 1, GdiPolyLineTo);
364}
365
366
367/*
368 * @implemented
369 */
370BOOL
371WINAPI
373 _In_ HDC hdc,
374 _In_ const POINT *apt,
375 _In_reads_(csz) const INT *asz,
376 _In_ INT csz)
377{
378 HANDLE_METADC(BOOL, PolyPolygon, FALSE, hdc, apt, asz, csz);
379
380 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
381
382 return NtGdiPolyPolyDraw(hdc, (PPOINT)apt, (PULONG)asz, csz, GdiPolyPolygon);
383}
384
385
386/*
387 * @implemented
388 */
389BOOL
390WINAPI
392 _In_ HDC hdc,
393 _In_ CONST POINT *apt,
394 _In_reads_(csz) CONST DWORD *asz,
395 _In_ DWORD csz)
396{
398 return FALSE;
399
400 HANDLE_EMETAFDC(BOOL, PolyPolyline, FALSE, hdc, apt, asz, csz);
401
402 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
403
404 return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, (PULONG)asz, csz, GdiPolyPolyLine);
405}
406
407
408/*
409 * @implemented
410 */
411BOOL
412WINAPI
414 _In_ HDC hdc,
415 _In_ INT xStart,
416 _In_ INT yStart,
417 _In_ COLORREF crFill,
418 _In_ UINT fuFillType)
419{
420 HANDLE_METADC(BOOL, ExtFloodFill, FALSE, hdc, xStart, yStart, crFill, fuFillType);
421
422 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
423
424 return NtGdiExtFloodFill(hdc, xStart, yStart, crFill, fuFillType);
425}
426
427
428/*
429 * @implemented
430 */
431BOOL
432WINAPI
434 _In_ HDC hdc,
435 _In_ INT xStart,
436 _In_ INT yStart,
437 _In_ COLORREF crFill)
438{
439 return ExtFloodFill(hdc, xStart, yStart, crFill, FLOODFILLBORDER);
440}
441
442/*
443 * @implemented
444 */
445BOOL
446WINAPI
448 _In_ HDC hdcDest,
449 _In_ INT xDest,
450 _In_ INT yDest,
451 _In_ INT cx,
452 _In_ INT cy,
454 _In_ INT xSrc,
455 _In_ INT ySrc,
456 _In_ DWORD dwRop)
457{
458 /* Use PatBlt for no source blt, like windows does */
459 if (!ROP_USES_SOURCE(dwRop))
460 {
461 return PatBlt(hdcDest, xDest, yDest, cx, cy, dwRop);
462 }
463
464 /* For meta DCs we use StretchBlt via emfdc.c */
466 BitBlt,
467 FALSE,
468 hdcDest,
469 xDest,
470 yDest,
471 cx,
472 cy,
473 hdcSrc,
474 xSrc,
475 ySrc,
476 dwRop);
477
478 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
479
480 return NtGdiBitBlt(hdcDest, xDest, yDest, cx, cy, hdcSrc, xSrc, ySrc, dwRop, 0, 0);
481}
482
483BOOL
484WINAPI
486 _In_ HDC hdc,
487 _In_ INT nXLeft,
488 _In_ INT nYLeft,
489 _In_ INT nWidth,
490 _In_ INT nHeight,
491 _In_ DWORD dwRop)
492{
493 PDC_ATTR pdcattr;
494
495 HANDLE_EMETAFDC(BOOL, PatBlt, FALSE, hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
496
497 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
498
499 /* Get the DC attribute */
500 pdcattr = GdiGetDcAttr(hdc);
501 if (pdcattr && !(pdcattr->ulDirty_ & DC_DIBSECTION))
502 {
503 PGDIBSPATBLT pgO;
504
506 if (pgO)
507 {
508 pdcattr->ulDirty_ |= DC_MODE_DIRTY;
509 pgO->nXLeft = nXLeft;
510 pgO->nYLeft = nYLeft;
511 pgO->nWidth = nWidth;
512 pgO->nHeight = nHeight;
513 pgO->dwRop = dwRop;
514 /* Snapshot attributes */
515 pgO->hbrush = pdcattr->hbrush;
516 pgO->crForegroundClr = pdcattr->crForegroundClr;
517 pgO->crBackgroundClr = pdcattr->crBackgroundClr;
518 pgO->crBrushClr = pdcattr->crBrushClr;
519 pgO->ulForegroundClr = pdcattr->ulForegroundClr;
520 pgO->ulBackgroundClr = pdcattr->ulBackgroundClr;
521 pgO->ulBrushClr = pdcattr->ulBrushClr;
522 return TRUE;
523 }
524 }
525 return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
526}
527
528BOOL
529WINAPI
531 _In_ HDC hdc,
532 _In_ DWORD dwRop,
533 _In_ PPOLYPATBLT pPoly,
534 _In_ DWORD nCount,
535 _In_ DWORD dwMode)
536{
537 UINT i;
538 BOOL bResult;
539 HBRUSH hbrOld;
540 PDC_ATTR pdcattr;
541
542 /* Handle meta DCs */
545 {
547 {
548 return FALSE;
549 }
550
551 /* Save the current DC brush */
552 hbrOld = SelectObject(hdc, GetStockObject(DC_BRUSH));
553
554 /* Assume success */
555 bResult = TRUE;
556
557 /* Loop all rect */
558 for (i = 0; i < nCount; i++)
559 {
560 /* Select the brush for this rect */
561 SelectObject(hdc, pPoly[i].hBrush);
562
563 /* Do the PatBlt operation for this rect */
564 bResult &= PatBlt(hdc,
565 pPoly[i].nXLeft,
566 pPoly[i].nYLeft,
567 pPoly[i].nWidth,
568 pPoly[i].nHeight,
569 dwRop);
570 }
571
572 /* Restore the old brush */
573 SelectObject(hdc, hbrOld);
574
575 return bResult;
576 }
577
578 /* Get the DC attribute */
579 pdcattr = GdiGetDcAttr(hdc);
580 if (nCount && pdcattr && !(pdcattr->ulDirty_ & DC_DIBSECTION))
581 {
582 PGDIBSPPATBLT pgO;
583 PTEB pTeb = NtCurrentTeb();
584
586 if (pgO)
587 {
588 USHORT cjSize = 0;
589 if (nCount > 1) cjSize = (nCount-1) * sizeof(PATRECT);
590
591 if ((pTeb->GdiTebBatch.Offset + cjSize) <= GDIBATCHBUFSIZE)
592 {
593 pdcattr->ulDirty_ |= DC_MODE_DIRTY;
594 pgO->Count = nCount;
595 pgO->Mode = dwMode;
596 pgO->rop4 = dwRop;
597 /* Snapshot attributes */
598 pgO->crForegroundClr = pdcattr->crForegroundClr;
599 pgO->crBackgroundClr = pdcattr->crBackgroundClr;
600 pgO->crBrushClr = pdcattr->crBrushClr;
601 pgO->ulForegroundClr = pdcattr->ulForegroundClr;
602 pgO->ulBackgroundClr = pdcattr->ulBackgroundClr;
603 pgO->ulBrushClr = pdcattr->ulBrushClr;
604 RtlCopyMemory(pgO->pRect, pPoly, nCount * sizeof(PATRECT));
605 // Recompute offset and return size, remember one is already accounted for in the structure.
606 pTeb->GdiTebBatch.Offset += cjSize;
607 ((PGDIBATCHHDR)pgO)->Size += cjSize;
608 return TRUE;
609 }
610 // Reset offset and count then fall through
611 pTeb->GdiTebBatch.Offset -= sizeof(GDIBSPPATBLT);
612 pTeb->GdiBatchCount--;
613 }
614 }
615 return NtGdiPolyPatBlt(hdc, dwRop, pPoly, nCount, dwMode);
616}
617
618/*
619 * @implemented
620 */
621BOOL
622WINAPI
624 _In_ HDC hdcDest,
625 _In_ INT xDest,
626 _In_ INT yDest,
627 _In_ INT cxDest,
628 _In_ INT cyDest,
630 _In_ INT xSrc,
631 _In_ INT ySrc,
632 _In_ INT cxSrc,
633 _In_ INT cySrc,
634 _In_ DWORD dwRop)
635{
638 FALSE,
639 hdcDest,
640 xDest,
641 yDest,
642 cxDest,
643 cyDest,
644 hdcSrc,
645 xSrc,
646 ySrc,
647 cxSrc,
648 cySrc,
649 dwRop);
650
651 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
652
653 return NtGdiStretchBlt(hdcDest,
654 xDest,
655 yDest,
656 cxDest,
657 cyDest,
658 hdcSrc,
659 xSrc,
660 ySrc,
661 cxSrc,
662 cySrc,
663 dwRop,
664 0);
665}
666
667
668/*
669 * @implemented
670 */
671BOOL
672WINAPI
674 _In_ HDC hdcDest,
675 _In_ INT xDest,
676 _In_ INT yDest,
677 _In_ INT cx,
678 _In_ INT cy,
680 _In_ INT xSrc,
681 _In_ INT ySrc,
682 _In_ HBITMAP hbmMask,
683 _In_ INT xMask,
684 _In_ INT yMask,
685 _In_ DWORD dwRop)
686{
688 MaskBlt,
689 FALSE,
690 hdcDest,
691 xDest,
692 yDest,
693 cx,
694 cy,
695 hdcSrc,
696 xSrc,
697 ySrc,
698 hbmMask,
699 xMask,
700 yMask,
701 dwRop);
702
703 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
704
705 return NtGdiMaskBlt(hdcDest,
706 xDest,
707 yDest,
708 cx,
709 cy,
710 hdcSrc,
711 xSrc,
712 ySrc,
713 hbmMask,
714 xMask,
715 yMask,
716 dwRop,
718}
719
720
721/*
722 * @implemented
723 */
724BOOL
725WINAPI
727 _In_ HDC hdcDest,
728 _In_reads_(3) const POINT * ppt,
730 _In_ INT xSrc,
731 _In_ INT ySrc,
732 _In_ INT cx,
733 _In_ INT cy,
734 _In_opt_ HBITMAP hbmMask,
735 _In_ INT xMask,
736 _In_ INT yMask)
737{
739 PlgBlt,
740 FALSE,
741 hdcDest,
742 ppt,
743 hdcSrc,
744 xSrc,
745 ySrc,
746 cx,
747 cy,
748 hbmMask,
749 xMask,
750 yMask);
751
752 if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
753
754 return NtGdiPlgBlt(hdcDest,
755 (LPPOINT)ppt,
756 hdcSrc,
757 xSrc,
758 ySrc,
759 cx,
760 cy,
761 hbmMask,
762 xMask,
763 yMask,
765}
766
767BOOL
768WINAPI
771 _In_ INT xDst,
772 _In_ INT yDst,
773 _In_ INT cxDst,
774 _In_ INT cyDst,
776 _In_ INT xSrc,
777 _In_ INT ySrc,
778 _In_ INT cxSrc,
779 _In_ INT cySrc,
780 _In_ BLENDFUNCTION blendfn)
781{
782 if (hdcSrc == NULL ) return FALSE;
783
785
788 FALSE,
789 hdcDst,
790 xDst,
791 yDst,
792 cxDst,
793 cyDst,
794 hdcSrc,
795 xSrc,
796 ySrc,
797 cxSrc,
798 cySrc,
799 blendfn);
800
801 if ( GdiConvertAndCheckDC(hdcDst) == NULL ) return FALSE;
802
803 return NtGdiAlphaBlend(hdcDst,
804 xDst,
805 yDst,
806 cxDst,
807 cyDst,
808 hdcSrc,
809 xSrc,
810 ySrc,
811 cxSrc,
812 cySrc,
813 blendfn,
814 0);
815}
816
817
818/*
819 * @implemented
820 */
821BOOL
822WINAPI
825 _In_ INT xDst,
826 _In_ INT yDst,
827 _In_ INT cxDst,
828 _In_ INT cyDst,
830 _In_ INT xSrc,
831 _In_ INT ySrc,
832 _In_ INT cxSrc,
833 _In_ INT cySrc,
834 _In_ UINT crTransparent)
835{
838 FALSE,
839 hdcDst,
840 xDst,
841 yDst,
842 cxDst,
843 cyDst,
844 hdcSrc,
845 xSrc,
846 ySrc,
847 cxSrc,
848 cySrc,
849 crTransparent);
850
851 if ( GdiConvertAndCheckDC(hdcDst) == NULL ) return FALSE;
852
853 return NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, crTransparent);
854}
855
856/*
857 * @implemented
858 */
859BOOL
860WINAPI
862 _In_ HDC hdc,
866 _In_ ULONG nCount,
868{
870
871 HANDLE_EMETAFDC(BOOL, GradientFill, FALSE, hdc, pVertex, nVertex, pMesh, nCount, ulMode);
872
873 if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
874
875 return NtGdiGradientFill(hdc, pVertex, nVertex, pMesh, nCount, ulMode);
876}
static HRGN hrgn
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
HDC WINAPI GdiConvertAndCheckDC(HDC hdc)
Definition: dc.c:403
FORCEINLINE PVOID GdiAllocBatchCommand(HDC hdc, USHORT Cmd)
Definition: gdi32p.h:381
BOOL WINAPI GdiValidateHandle(HGDIOBJ)
Definition: misc.c:712
#define HANDLE_METADC(_RetType, _Func, dwError, hdc,...)
Definition: gdi32p.h:589
#define ROP_USES_SOURCE(Rop)
Definition: gdi32p.h:88
FORCEINLINE PDC_ATTR GdiGetDcAttr(HDC hdc)
Definition: gdi32p.h:451
#define HANDLE_EMETAFDC(_RetType, _Func, dwError, hdc,...)
Definition: gdi32p.h:644
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
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:726
BOOL WINAPI FrameRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbr, _In_ INT nWidth, _In_ INT nHeight)
Definition: painting.c:205
BOOL WINAPI ExtFloodFill(_In_ HDC hdc, _In_ INT xStart, _In_ INT yStart, _In_ COLORREF crFill, _In_ UINT fuFillType)
Definition: painting.c:413
BOOL WINAPI PolyBezier(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:263
BOOL WINAPI MoveToEx(_In_ HDC hdc, _In_ INT x, _In_ INT y, _Out_opt_ LPPOINT ppt)
Definition: painting.c:24
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ INT cpt)
Definition: painting.c:336
BOOL WINAPI PolylineTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:354
BOOL WINAPI FillRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbr)
Definition: painting.c:183
COLORREF WINAPI SetPixel(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
Definition: painting.c:149
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: painting.c:823
BOOL WINAPI InvertRgn(_In_ HDC hdc, _In_ HRGN hrgn)
Definition: painting.c:229
BOOL WINAPI PolyBezierTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:281
COLORREF WINAPI GetPixel(_In_ HDC hdc, _In_ INT x, _In_ INT y)
Definition: painting.c:133
BOOL WINAPI PatBlt(_In_ HDC hdc, _In_ INT nXLeft, _In_ INT nYLeft, _In_ INT nWidth, _In_ INT nHeight, _In_ DWORD dwRop)
Definition: painting.c:485
BOOL WINAPI PolyPolyline(_In_ HDC hdc, _In_ CONST POINT *apt, _In_reads_(csz) CONST DWORD *asz, _In_ DWORD csz)
Definition: painting.c:391
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: painting.c:769
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:623
BOOL WINAPI GdiGradientFill(_In_ HDC hdc, _In_reads_(nVertex) PTRIVERTEX pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nCount, _In_ ULONG ulMode)
Definition: painting.c:861
BOOL WINAPI PolyDraw(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_reads_(cpt) const BYTE *aj, _In_ INT cpt)
Definition: painting.c:299
BOOL WINAPI PaintRgn(_In_ HDC hdc, _In_ HRGN hrgn)
Definition: painting.c:250
BOOL WINAPI Ellipse(_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom)
Definition: painting.c:71
BOOL WINAPI Rectangle(_In_ HDC hdc, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom)
Definition: painting.c:91
BOOL WINAPI FloodFill(_In_ HDC hdc, _In_ INT xStart, _In_ INT yStart, _In_ COLORREF crFill)
Definition: painting.c:433
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:447
BOOL WINAPI Polygon(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ INT cpt)
Definition: painting.c:318
BOOL WINAPI PolyPolygon(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const INT *asz, _In_ INT csz)
Definition: painting.c:372
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:673
BOOL WINAPI LineTo(_In_ HDC hdc, _In_ INT x, _In_ INT y)
Definition: painting.c:9
BOOL WINAPI PolyPatBlt(_In_ HDC hdc, _In_ DWORD dwRop, _In_ PPOLYPATBLT pPoly, _In_ DWORD nCount, _In_ DWORD dwMode)
Definition: painting.c:530
BOOL WINAPI SetPixelV(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
Definition: painting.c:168
#define GDI_OBJECT_TYPE_DC
Definition: gdi.h:46
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
#define GDI_OBJECT_TYPE_METADC
Definition: gdi.h:57
@ GDILoObjType_LO_METADC16_TYPE
Definition: gdi_private.h:49
@ GDILoObjType_LO_ALTDC_TYPE
Definition: gdi_private.h:43
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
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
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
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
unsigned int UINT
Definition: ndis.h:50
#define _In_reads_(s)
Definition: no_sal2.h:168
#define _Out_opt_
Definition: no_sal2.h:214
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
__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)
__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)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiGetPixel(_In_ HDC hdc, _In_ INT x, _In_ INT y)
Definition: bitblt.c:1520
__kernel_entry W32KAPI BOOL APIENTRY NtGdiInvertRgn(_In_ HDC hdc, _In_ HRGN hrgn)
Definition: bitblt.c:1384
__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)
__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)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiFrameRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbrush, _In_ INT xWidth, _In_ INT yHeight)
Definition: bitblt.c:1360
__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)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiExtFloodFill(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ COLORREF crColor, _In_ UINT iFillType)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiGradientFill(_In_ HDC hdc, _In_ PTRIVERTEX pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nMesh, _In_ ULONG ulMode)
__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)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiRectangle(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__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)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiFillRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ HBRUSH hbrush)
Definition: bitblt.c:1303
__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:992
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPolyPatBlt(_In_ HDC hdc, _In_ DWORD rop4, _In_reads_(cPoly) PPOLYPATBLT pPoly, _In_ DWORD cPoly, _In_ DWORD dwMode)
__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
__kernel_entry W32KAPI BOOL APIENTRY NtGdiEllipse(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiLineTo(_In_ HDC hdc, _In_ INT x, _In_ INT y)
__kernel_entry W32KAPI COLORREF APIENTRY NtGdiSetPixel(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ COLORREF crColor)
Definition: bitblt.c:1431
__kernel_entry W32KAPI ULONG_PTR APIENTRY NtGdiPolyPolyDraw(_In_ HDC hdc, _In_ PPOINT ppt, _In_reads_(ccpt) PULONG pcpt, _In_ ULONG ccpt, _In_ INT iFunc)
#define DC_DIBSECTION
Definition: ntgdihdl.h:137
#define DC_MODE_DIRTY
Definition: ntgdihdl.h:144
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:131
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:133
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:132
#define GDIBATCHBUFSIZE
Definition: ntgdityp.h:200
struct _GDIBATCHHDR * PGDIBATCHHDR
struct _GDIBSPPATBLT GDIBSPPATBLT
@ GdiPolyPolygon
Definition: ntgdityp.h:38
@ GdiPolyPolyLine
Definition: ntgdityp.h:39
@ GdiPolyBezierTo
Definition: ntgdityp.h:42
@ GdiPolyLineTo
Definition: ntgdityp.h:41
@ GdiPolyBezier
Definition: ntgdityp.h:40
@ GdiBCPatBlt
Definition: ntgdityp.h:86
@ GdiBCPolyPatBlt
Definition: ntgdityp.h:87
#define OBJ_BRUSH
Definition: objidl.idl:1410
#define CONST
Definition: pedump.c:81
BYTE * PBYTE
Definition: pedump.c:66
unsigned short USHORT
Definition: pedump.c:61
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
POINTL ptlCurrent
Definition: ntgdihdl.h:311
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 ulDirty_
Definition: ntgdihdl.h:294
POINTL ptfxCurrent
Definition: ntgdihdl.h:312
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
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
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
Definition: compat.h:836
GDI_TEB_BATCH GdiTebBatch
Definition: compat.h:857
ULONG GdiBatchCount
Definition: compat.h:887
uint32_t * PULONG
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG
Definition: typedefs.h:59
#define TransparentBlt
Definition: misc.c:292
#define AlphaBlend
Definition: misc.c:293
_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_ ULONG cjSize
Definition: winddi.h:3634
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX * pVertex
Definition: winddi.h:3651
DWORD COLORREF
Definition: windef.h:300
#define WINAPI
Definition: msvc.h:6
#define FLOODFILLBORDER
Definition: wingdi.h:644
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI DPtoLP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
#define CLR_INVALID
Definition: wingdi.h:883
COLORREF WINAPI GetBkColor(_In_ HDC)
Definition: dc.c:978
static HDC hdcSrc
Definition: xlate.c:32
static HDC hdcDst
Definition: xlate.c:32
unsigned char BYTE
Definition: xxhash.c:193