1c2c66affSColin Finck #include <precomp.h>
2c2c66affSColin Finck
3c2c66affSColin Finck
4c2c66affSColin Finck /*
5c2c66affSColin Finck * @implemented
6c2c66affSColin Finck */
7c2c66affSColin Finck BOOL
8c2c66affSColin Finck WINAPI
LineTo(_In_ HDC hdc,_In_ INT x,_In_ INT y)9c2c66affSColin Finck LineTo(
10c2c66affSColin Finck _In_ HDC hdc,
11c2c66affSColin Finck _In_ INT x,
12c2c66affSColin Finck _In_ INT y )
13c2c66affSColin Finck {
14c2c66affSColin Finck HANDLE_METADC(BOOL, LineTo, FALSE, hdc, x, y);
15c2c66affSColin Finck
1666587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
1766587152Sjimtabor
18c2c66affSColin Finck return NtGdiLineTo(hdc, x, y);
19c2c66affSColin Finck }
20c2c66affSColin Finck
21c2c66affSColin Finck
22c2c66affSColin Finck BOOL
23c2c66affSColin Finck WINAPI
MoveToEx(_In_ HDC hdc,_In_ INT x,_In_ INT y,_Out_opt_ LPPOINT ppt)24c2c66affSColin Finck MoveToEx(
25c2c66affSColin Finck _In_ HDC hdc,
26c2c66affSColin Finck _In_ INT x,
27c2c66affSColin Finck _In_ INT y,
28c2c66affSColin Finck _Out_opt_ LPPOINT ppt)
29c2c66affSColin Finck {
30c2c66affSColin Finck PDC_ATTR pdcattr;
31c2c66affSColin Finck
32*fc16259fSJames Tabor HANDLE_METADC(BOOL, MoveTo, FALSE, hdc, x, y);
33c2c66affSColin Finck
34c2c66affSColin Finck /* Get the DC attribute */
35c2c66affSColin Finck pdcattr = GdiGetDcAttr(hdc);
36c2c66affSColin Finck if (pdcattr == NULL)
37c2c66affSColin Finck {
38c2c66affSColin Finck SetLastError(ERROR_INVALID_PARAMETER);
39c2c66affSColin Finck return FALSE;
40c2c66affSColin Finck }
41c2c66affSColin Finck
42c2c66affSColin Finck if (ppt)
43c2c66affSColin Finck {
44c2c66affSColin Finck if ( pdcattr->ulDirty_ & DIRTY_PTLCURRENT ) // Double hit!
45c2c66affSColin Finck {
46c2c66affSColin Finck ppt->x = pdcattr->ptfxCurrent.x; // ret prev before change.
47c2c66affSColin Finck ppt->y = pdcattr->ptfxCurrent.y;
48c2c66affSColin Finck DPtoLP (hdc, ppt, 1); // reconvert back.
49c2c66affSColin Finck }
50c2c66affSColin Finck else
51c2c66affSColin Finck {
52c2c66affSColin Finck ppt->x = pdcattr->ptlCurrent.x;
53c2c66affSColin Finck ppt->y = pdcattr->ptlCurrent.y;
54c2c66affSColin Finck }
55c2c66affSColin Finck }
56c2c66affSColin Finck
57c2c66affSColin Finck pdcattr->ptlCurrent.x = x;
58c2c66affSColin Finck pdcattr->ptlCurrent.y = y;
59c2c66affSColin Finck
60c2c66affSColin Finck pdcattr->ulDirty_ &= ~DIRTY_PTLCURRENT;
61c2c66affSColin Finck pdcattr->ulDirty_ |= ( DIRTY_PTFXCURRENT|DIRTY_STYLESTATE); // Set dirty
62c2c66affSColin Finck return TRUE;
63c2c66affSColin Finck }
64c2c66affSColin Finck
65c2c66affSColin Finck
66c2c66affSColin Finck /*
67c2c66affSColin Finck * @implemented
68c2c66affSColin Finck */
69c2c66affSColin Finck BOOL
70c2c66affSColin Finck WINAPI
Ellipse(_In_ HDC hdc,_In_ INT left,_In_ INT top,_In_ INT right,_In_ INT bottom)71c2c66affSColin Finck Ellipse(
72c2c66affSColin Finck _In_ HDC hdc,
73c2c66affSColin Finck _In_ INT left,
74c2c66affSColin Finck _In_ INT top,
75c2c66affSColin Finck _In_ INT right,
76c2c66affSColin Finck _In_ INT bottom)
77c2c66affSColin Finck {
78c2c66affSColin Finck HANDLE_METADC(BOOL, Ellipse, FALSE, hdc, left, top, right, bottom);
79c2c66affSColin Finck
8066587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
8166587152Sjimtabor
82c2c66affSColin Finck return NtGdiEllipse(hdc, left, top, right, bottom);
83c2c66affSColin Finck }
84c2c66affSColin Finck
85c2c66affSColin Finck
86c2c66affSColin Finck /*
87c2c66affSColin Finck * @implemented
88c2c66affSColin Finck */
89c2c66affSColin Finck BOOL
90c2c66affSColin Finck WINAPI
Rectangle(_In_ HDC hdc,_In_ INT left,_In_ INT top,_In_ INT right,_In_ INT bottom)91c2c66affSColin Finck Rectangle(
92c2c66affSColin Finck _In_ HDC hdc,
93c2c66affSColin Finck _In_ INT left,
94c2c66affSColin Finck _In_ INT top,
95c2c66affSColin Finck _In_ INT right,
96c2c66affSColin Finck _In_ INT bottom)
97c2c66affSColin Finck {
98c2c66affSColin Finck HANDLE_METADC(BOOL, Rectangle, FALSE, hdc, left, top, right, bottom);
99c2c66affSColin Finck
10066587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
10166587152Sjimtabor
102c2c66affSColin Finck return NtGdiRectangle(hdc, left, top, right, bottom);
103c2c66affSColin Finck }
104c2c66affSColin Finck
105c2c66affSColin Finck
106c2c66affSColin Finck /*
107c2c66affSColin Finck * @implemented
108c2c66affSColin Finck */
109c2c66affSColin Finck BOOL
110c2c66affSColin Finck WINAPI
RoundRect(_In_ HDC hdc,_In_ INT left,_In_ INT top,_In_ INT right,_In_ INT bottom,_In_ INT width,_In_ INT height)111c2c66affSColin Finck RoundRect(
112c2c66affSColin Finck _In_ HDC hdc,
113c2c66affSColin Finck _In_ INT left,
114c2c66affSColin Finck _In_ INT top,
115c2c66affSColin Finck _In_ INT right,
116c2c66affSColin Finck _In_ INT bottom,
117c2c66affSColin Finck _In_ INT width,
118c2c66affSColin Finck _In_ INT height)
119c2c66affSColin Finck {
120c2c66affSColin Finck HANDLE_METADC(BOOL, RoundRect, FALSE, hdc, left, top, right, bottom, width, height);
121c2c66affSColin Finck
12266587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
12366587152Sjimtabor
124c2c66affSColin Finck return NtGdiRoundRect(hdc, left, top, right, bottom, width, height);
125c2c66affSColin Finck }
126c2c66affSColin Finck
127c2c66affSColin Finck
128c2c66affSColin Finck /*
129c2c66affSColin Finck * @implemented
130c2c66affSColin Finck */
131c2c66affSColin Finck COLORREF
132c2c66affSColin Finck WINAPI
GetPixel(_In_ HDC hdc,_In_ INT x,_In_ INT y)133c2c66affSColin Finck GetPixel(
134c2c66affSColin Finck _In_ HDC hdc,
135c2c66affSColin Finck _In_ INT x,
136c2c66affSColin Finck _In_ INT y)
137c2c66affSColin Finck {
138c2c66affSColin Finck if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC) return CLR_INVALID;
139c2c66affSColin Finck if (!GdiValidateHandle((HGDIOBJ) hdc)) return CLR_INVALID;
140c2c66affSColin Finck return NtGdiGetPixel(hdc, x, y);
141c2c66affSColin Finck }
142c2c66affSColin Finck
143c2c66affSColin Finck
144c2c66affSColin Finck /*
145c2c66affSColin Finck * @implemented
146c2c66affSColin Finck */
147c2c66affSColin Finck COLORREF
148c2c66affSColin Finck WINAPI
SetPixel(_In_ HDC hdc,_In_ INT x,_In_ INT y,_In_ COLORREF crColor)149c2c66affSColin Finck SetPixel(
150c2c66affSColin Finck _In_ HDC hdc,
151c2c66affSColin Finck _In_ INT x,
152c2c66affSColin Finck _In_ INT y,
153c2c66affSColin Finck _In_ COLORREF crColor)
154c2c66affSColin Finck {
155c2c66affSColin Finck HANDLE_METADC(COLORREF, SetPixel, CLR_INVALID, hdc, x, y, crColor);
156c2c66affSColin Finck
15766587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
15866587152Sjimtabor
159c2c66affSColin Finck return NtGdiSetPixel(hdc, x, y, crColor);
160c2c66affSColin Finck }
161c2c66affSColin Finck
162c2c66affSColin Finck
163c2c66affSColin Finck /*
164c2c66affSColin Finck * @implemented
165c2c66affSColin Finck */
166c2c66affSColin Finck BOOL
167c2c66affSColin Finck WINAPI
SetPixelV(_In_ HDC hdc,_In_ INT x,_In_ INT y,_In_ COLORREF crColor)168c2c66affSColin Finck SetPixelV(
169c2c66affSColin Finck _In_ HDC hdc,
170c2c66affSColin Finck _In_ INT x,
171c2c66affSColin Finck _In_ INT y,
172c2c66affSColin Finck _In_ COLORREF crColor)
173c2c66affSColin Finck {
174c2c66affSColin Finck return SetPixel(hdc, x, y, crColor) != CLR_INVALID;
175c2c66affSColin Finck }
176c2c66affSColin Finck
177c2c66affSColin Finck
178c2c66affSColin Finck /*
179c2c66affSColin Finck * @implemented
180c2c66affSColin Finck */
181c2c66affSColin Finck BOOL
182c2c66affSColin Finck WINAPI
FillRgn(_In_ HDC hdc,_In_ HRGN hrgn,_In_ HBRUSH hbr)183c2c66affSColin Finck FillRgn(
184c2c66affSColin Finck _In_ HDC hdc,
185c2c66affSColin Finck _In_ HRGN hrgn,
186c2c66affSColin Finck _In_ HBRUSH hbr)
187c2c66affSColin Finck {
188c2c66affSColin Finck
189c2c66affSColin Finck if ((hrgn == NULL) || (hbr == NULL))
190c2c66affSColin Finck return FALSE;
191c2c66affSColin Finck
192c2c66affSColin Finck HANDLE_METADC(BOOL, FillRgn, FALSE, hdc, hrgn, hbr);
193c2c66affSColin Finck
19466587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
19566587152Sjimtabor
196c2c66affSColin Finck return NtGdiFillRgn(hdc, hrgn, hbr);
197c2c66affSColin Finck }
198c2c66affSColin Finck
199c2c66affSColin Finck
200c2c66affSColin Finck /*
201c2c66affSColin Finck * @implemented
202c2c66affSColin Finck */
203c2c66affSColin Finck BOOL
204c2c66affSColin Finck WINAPI
FrameRgn(_In_ HDC hdc,_In_ HRGN hrgn,_In_ HBRUSH hbr,_In_ INT nWidth,_In_ INT nHeight)205c2c66affSColin Finck FrameRgn(
206c2c66affSColin Finck _In_ HDC hdc,
207c2c66affSColin Finck _In_ HRGN hrgn,
208c2c66affSColin Finck _In_ HBRUSH hbr,
209c2c66affSColin Finck _In_ INT nWidth,
210c2c66affSColin Finck _In_ INT nHeight)
211c2c66affSColin Finck {
212c2c66affSColin Finck
213c2c66affSColin Finck if ((hrgn == NULL) || (hbr == NULL))
214c2c66affSColin Finck return FALSE;
215c2c66affSColin Finck
216c2c66affSColin Finck HANDLE_METADC(BOOL, FrameRgn, FALSE, hdc, hrgn, hbr, nWidth, nHeight);
217c2c66affSColin Finck
21866587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
21966587152Sjimtabor
220c2c66affSColin Finck return NtGdiFrameRgn(hdc, hrgn, hbr, nWidth, nHeight);
221c2c66affSColin Finck }
222c2c66affSColin Finck
223c2c66affSColin Finck
224c2c66affSColin Finck /*
225c2c66affSColin Finck * @implemented
226c2c66affSColin Finck */
227c2c66affSColin Finck BOOL
228c2c66affSColin Finck WINAPI
InvertRgn(_In_ HDC hdc,_In_ HRGN hrgn)229c2c66affSColin Finck InvertRgn(
230c2c66affSColin Finck _In_ HDC hdc,
231c2c66affSColin Finck _In_ HRGN hrgn)
232c2c66affSColin Finck {
233c2c66affSColin Finck
234c2c66affSColin Finck if (hrgn == NULL)
235c2c66affSColin Finck return FALSE;
236c2c66affSColin Finck
237c2c66affSColin Finck HANDLE_METADC(BOOL, InvertRgn, FALSE, hdc, hrgn);
238c2c66affSColin Finck
23966587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
24066587152Sjimtabor
241c2c66affSColin Finck return NtGdiInvertRgn(hdc, hrgn);
242c2c66affSColin Finck }
243c2c66affSColin Finck
244c2c66affSColin Finck
245c2c66affSColin Finck /*
246c2c66affSColin Finck * @implemented
247c2c66affSColin Finck */
248c2c66affSColin Finck BOOL
249c2c66affSColin Finck WINAPI
PaintRgn(_In_ HDC hdc,_In_ HRGN hrgn)250c2c66affSColin Finck PaintRgn(
251c2c66affSColin Finck _In_ HDC hdc,
252c2c66affSColin Finck _In_ HRGN hrgn)
253c2c66affSColin Finck {
254c2c66affSColin Finck return FillRgn(hdc, hrgn, GetCurrentObject(hdc, OBJ_BRUSH));
255c2c66affSColin Finck }
256c2c66affSColin Finck
257c2c66affSColin Finck
258c2c66affSColin Finck /*
259c2c66affSColin Finck * @implemented
260c2c66affSColin Finck */
261c2c66affSColin Finck BOOL
262c2c66affSColin Finck WINAPI
PolyBezier(_In_ HDC hdc,_In_reads_ (cpt)const POINT * apt,_In_ DWORD cpt)263c2c66affSColin Finck PolyBezier(
264c2c66affSColin Finck _In_ HDC hdc,
265c2c66affSColin Finck _In_reads_(cpt) const POINT *apt,
266c2c66affSColin Finck _In_ DWORD cpt)
267c2c66affSColin Finck {
268*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, PolyBezier, FALSE, hdc, apt, cpt);
269c2c66affSColin Finck
27066587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
27166587152Sjimtabor
272c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc ,(PPOINT)apt, &cpt, 1, GdiPolyBezier);
273c2c66affSColin Finck }
274c2c66affSColin Finck
275c2c66affSColin Finck
276c2c66affSColin Finck /*
277c2c66affSColin Finck * @implemented
278c2c66affSColin Finck */
279c2c66affSColin Finck BOOL
280c2c66affSColin Finck WINAPI
PolyBezierTo(_In_ HDC hdc,_In_reads_ (cpt)const POINT * apt,_In_ DWORD cpt)281c2c66affSColin Finck PolyBezierTo(
282c2c66affSColin Finck _In_ HDC hdc,
283c2c66affSColin Finck _In_reads_(cpt) const POINT *apt,
284c2c66affSColin Finck _In_ DWORD cpt)
285c2c66affSColin Finck {
286*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, PolyBezierTo, FALSE, hdc, apt, cpt);
287c2c66affSColin Finck
28866587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
28966587152Sjimtabor
290c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, &cpt, 1, GdiPolyBezierTo);
291c2c66affSColin Finck }
292c2c66affSColin Finck
293c2c66affSColin Finck
294c2c66affSColin Finck /*
295c2c66affSColin Finck * @implemented
296c2c66affSColin Finck */
297c2c66affSColin Finck BOOL
298c2c66affSColin Finck WINAPI
PolyDraw(_In_ HDC hdc,_In_reads_ (cpt)const POINT * apt,_In_reads_ (cpt)const BYTE * aj,_In_ INT cpt)299c2c66affSColin Finck PolyDraw(
300c2c66affSColin Finck _In_ HDC hdc,
301c2c66affSColin Finck _In_reads_(cpt) const POINT *apt,
302c2c66affSColin Finck _In_reads_(cpt) const BYTE *aj,
303c2c66affSColin Finck _In_ INT cpt)
304c2c66affSColin Finck {
305*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, PolyDraw, FALSE, hdc, apt, aj, cpt);
306c2c66affSColin Finck
30766587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
30866587152Sjimtabor
309c2c66affSColin Finck return NtGdiPolyDraw(hdc, (PPOINT)apt, (PBYTE)aj, cpt);
310c2c66affSColin Finck }
311c2c66affSColin Finck
312c2c66affSColin Finck
313c2c66affSColin Finck /*
314c2c66affSColin Finck * @implemented
315c2c66affSColin Finck */
316c2c66affSColin Finck BOOL
317c2c66affSColin Finck WINAPI
Polygon(_In_ HDC hdc,_In_reads_ (cpt)const POINT * apt,_In_ INT cpt)318c2c66affSColin Finck Polygon(
319c2c66affSColin Finck _In_ HDC hdc,
320c2c66affSColin Finck _In_reads_(cpt) const POINT *apt,
321c2c66affSColin Finck _In_ INT cpt)
322c2c66affSColin Finck {
323c2c66affSColin Finck HANDLE_METADC(BOOL, Polygon, FALSE, hdc, apt, cpt);
324c2c66affSColin Finck
32566587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
32666587152Sjimtabor
327c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, (PULONG)&cpt, 1, GdiPolyPolygon);
328c2c66affSColin Finck }
329c2c66affSColin Finck
330c2c66affSColin Finck
331c2c66affSColin Finck /*
332c2c66affSColin Finck * @implemented
333c2c66affSColin Finck */
334c2c66affSColin Finck BOOL
335c2c66affSColin Finck WINAPI
Polyline(_In_ HDC hdc,_In_reads_ (cpt)const POINT * apt,_In_ INT cpt)336c2c66affSColin Finck Polyline(
337c2c66affSColin Finck _In_ HDC hdc,
338c2c66affSColin Finck _In_reads_(cpt) const POINT *apt,
339c2c66affSColin Finck _In_ INT cpt)
340c2c66affSColin Finck {
341c2c66affSColin Finck HANDLE_METADC(BOOL, Polyline, FALSE, hdc, apt, cpt);
342c2c66affSColin Finck
34366587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
34466587152Sjimtabor
345c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc, (PPOINT)apt, (PULONG)&cpt, 1, GdiPolyPolyLine);
346c2c66affSColin Finck }
347c2c66affSColin Finck
348c2c66affSColin Finck
349c2c66affSColin Finck /*
350c2c66affSColin Finck * @implemented
351c2c66affSColin Finck */
352c2c66affSColin Finck BOOL
353c2c66affSColin Finck WINAPI
PolylineTo(_In_ HDC hdc,_In_reads_ (cpt)const POINT * apt,_In_ DWORD cpt)354c2c66affSColin Finck PolylineTo(
355c2c66affSColin Finck _In_ HDC hdc,
356c2c66affSColin Finck _In_reads_(cpt) const POINT *apt,
357c2c66affSColin Finck _In_ DWORD cpt)
358c2c66affSColin Finck {
359*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, PolylineTo, FALSE, hdc, apt, cpt);
360c2c66affSColin Finck
36166587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
36266587152Sjimtabor
363c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, &cpt, 1, GdiPolyLineTo);
364c2c66affSColin Finck }
365c2c66affSColin Finck
366c2c66affSColin Finck
367c2c66affSColin Finck /*
368c2c66affSColin Finck * @implemented
369c2c66affSColin Finck */
370c2c66affSColin Finck BOOL
371c2c66affSColin Finck WINAPI
PolyPolygon(_In_ HDC hdc,_In_ const POINT * apt,_In_reads_ (csz)const INT * asz,_In_ INT csz)372c2c66affSColin Finck PolyPolygon(
373c2c66affSColin Finck _In_ HDC hdc,
374c2c66affSColin Finck _In_ const POINT *apt,
375c2c66affSColin Finck _In_reads_(csz) const INT *asz,
376c2c66affSColin Finck _In_ INT csz)
377c2c66affSColin Finck {
378c2c66affSColin Finck HANDLE_METADC(BOOL, PolyPolygon, FALSE, hdc, apt, asz, csz);
379c2c66affSColin Finck
38066587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
38166587152Sjimtabor
382c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc, (PPOINT)apt, (PULONG)asz, csz, GdiPolyPolygon);
383c2c66affSColin Finck }
384c2c66affSColin Finck
385c2c66affSColin Finck
386c2c66affSColin Finck /*
387c2c66affSColin Finck * @implemented
388c2c66affSColin Finck */
389c2c66affSColin Finck BOOL
390c2c66affSColin Finck WINAPI
PolyPolyline(_In_ HDC hdc,_In_ CONST POINT * apt,_In_reads_ (csz)CONST DWORD * asz,_In_ DWORD csz)391c2c66affSColin Finck PolyPolyline(
392c2c66affSColin Finck _In_ HDC hdc,
393c2c66affSColin Finck _In_ CONST POINT *apt,
394c2c66affSColin Finck _In_reads_(csz) CONST DWORD *asz,
395c2c66affSColin Finck _In_ DWORD csz)
396c2c66affSColin Finck {
397c2c66affSColin Finck if (GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_METADC16_TYPE)
398c2c66affSColin Finck return FALSE;
399c2c66affSColin Finck
400*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, PolyPolyline, FALSE, hdc, apt, asz, csz);
401c2c66affSColin Finck
40266587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
40366587152Sjimtabor
404c2c66affSColin Finck return NtGdiPolyPolyDraw(hdc , (PPOINT)apt, (PULONG)asz, csz, GdiPolyPolyLine);
405c2c66affSColin Finck }
406c2c66affSColin Finck
407c2c66affSColin Finck
408c2c66affSColin Finck /*
409c2c66affSColin Finck * @implemented
410c2c66affSColin Finck */
411c2c66affSColin Finck BOOL
412c2c66affSColin Finck WINAPI
ExtFloodFill(_In_ HDC hdc,_In_ INT xStart,_In_ INT yStart,_In_ COLORREF crFill,_In_ UINT fuFillType)413c2c66affSColin Finck ExtFloodFill(
414c2c66affSColin Finck _In_ HDC hdc,
415c2c66affSColin Finck _In_ INT xStart,
416c2c66affSColin Finck _In_ INT yStart,
417c2c66affSColin Finck _In_ COLORREF crFill,
418c2c66affSColin Finck _In_ UINT fuFillType)
419c2c66affSColin Finck {
420c2c66affSColin Finck HANDLE_METADC(BOOL, ExtFloodFill, FALSE, hdc, xStart, yStart, crFill, fuFillType);
421c2c66affSColin Finck
42266587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
42366587152Sjimtabor
424c2c66affSColin Finck return NtGdiExtFloodFill(hdc, xStart, yStart, crFill, fuFillType);
425c2c66affSColin Finck }
426c2c66affSColin Finck
427c2c66affSColin Finck
428c2c66affSColin Finck /*
429c2c66affSColin Finck * @implemented
430c2c66affSColin Finck */
431c2c66affSColin Finck BOOL
432c2c66affSColin Finck WINAPI
FloodFill(_In_ HDC hdc,_In_ INT xStart,_In_ INT yStart,_In_ COLORREF crFill)433c2c66affSColin Finck FloodFill(
434c2c66affSColin Finck _In_ HDC hdc,
435c2c66affSColin Finck _In_ INT xStart,
436c2c66affSColin Finck _In_ INT yStart,
437c2c66affSColin Finck _In_ COLORREF crFill)
438c2c66affSColin Finck {
439c2c66affSColin Finck return ExtFloodFill(hdc, xStart, yStart, crFill, FLOODFILLBORDER);
440c2c66affSColin Finck }
441c2c66affSColin Finck
442c2c66affSColin Finck /*
443c2c66affSColin Finck * @implemented
444c2c66affSColin Finck */
445c2c66affSColin Finck BOOL
446c2c66affSColin Finck 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)447c2c66affSColin Finck BitBlt(
448c2c66affSColin Finck _In_ HDC hdcDest,
449c2c66affSColin Finck _In_ INT xDest,
450c2c66affSColin Finck _In_ INT yDest,
451c2c66affSColin Finck _In_ INT cx,
452c2c66affSColin Finck _In_ INT cy,
453c2c66affSColin Finck _In_opt_ HDC hdcSrc,
454c2c66affSColin Finck _In_ INT xSrc,
455c2c66affSColin Finck _In_ INT ySrc,
456c2c66affSColin Finck _In_ DWORD dwRop)
457c2c66affSColin Finck {
458c2c66affSColin Finck /* Use PatBlt for no source blt, like windows does */
459c2c66affSColin Finck if (!ROP_USES_SOURCE(dwRop))
460c2c66affSColin Finck {
461c2c66affSColin Finck return PatBlt(hdcDest, xDest, yDest, cx, cy, dwRop);
462c2c66affSColin Finck }
463c2c66affSColin Finck
464*fc16259fSJames Tabor /* For meta DCs we use StretchBlt via emfdc.c */
465c2c66affSColin Finck HANDLE_METADC(BOOL,
466*fc16259fSJames Tabor BitBlt,
467c2c66affSColin Finck FALSE,
468c2c66affSColin Finck hdcDest,
469c2c66affSColin Finck xDest,
470c2c66affSColin Finck yDest,
471c2c66affSColin Finck cx,
4727624a987SDoug Lyons cy,
473c2c66affSColin Finck hdcSrc,
474c2c66affSColin Finck xSrc,
475c2c66affSColin Finck ySrc,
476c2c66affSColin Finck dwRop);
477c2c66affSColin Finck
47866587152Sjimtabor if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
47966587152Sjimtabor
480c2c66affSColin Finck return NtGdiBitBlt(hdcDest, xDest, yDest, cx, cy, hdcSrc, xSrc, ySrc, dwRop, 0, 0);
481c2c66affSColin Finck }
482c2c66affSColin Finck
483c2c66affSColin Finck BOOL
484c2c66affSColin Finck WINAPI
PatBlt(_In_ HDC hdc,_In_ INT nXLeft,_In_ INT nYLeft,_In_ INT nWidth,_In_ INT nHeight,_In_ DWORD dwRop)485c2c66affSColin Finck PatBlt(
486c2c66affSColin Finck _In_ HDC hdc,
487c2c66affSColin Finck _In_ INT nXLeft,
488c2c66affSColin Finck _In_ INT nYLeft,
489c2c66affSColin Finck _In_ INT nWidth,
490c2c66affSColin Finck _In_ INT nHeight,
491c2c66affSColin Finck _In_ DWORD dwRop)
492c2c66affSColin Finck {
493b6262a25Sjimtabor PDC_ATTR pdcattr;
494b6262a25Sjimtabor
495*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, PatBlt, FALSE, hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
496c2c66affSColin Finck
49766587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
49866587152Sjimtabor
499b6262a25Sjimtabor /* Get the DC attribute */
500b6262a25Sjimtabor pdcattr = GdiGetDcAttr(hdc);
501b6262a25Sjimtabor if (pdcattr && !(pdcattr->ulDirty_ & DC_DIBSECTION))
502b6262a25Sjimtabor {
503b6262a25Sjimtabor PGDIBSPATBLT pgO;
504b6262a25Sjimtabor
505b6262a25Sjimtabor pgO = GdiAllocBatchCommand(hdc, GdiBCPatBlt);
506b6262a25Sjimtabor if (pgO)
507b6262a25Sjimtabor {
508b751c31cSJames Tabor pdcattr->ulDirty_ |= DC_MODE_DIRTY;
509b6262a25Sjimtabor pgO->nXLeft = nXLeft;
510b6262a25Sjimtabor pgO->nYLeft = nYLeft;
511b6262a25Sjimtabor pgO->nWidth = nWidth;
512b6262a25Sjimtabor pgO->nHeight = nHeight;
513b6262a25Sjimtabor pgO->dwRop = dwRop;
514b6262a25Sjimtabor /* Snapshot attributes */
515b6262a25Sjimtabor pgO->hbrush = pdcattr->hbrush;
516b6262a25Sjimtabor pgO->crForegroundClr = pdcattr->crForegroundClr;
517b6262a25Sjimtabor pgO->crBackgroundClr = pdcattr->crBackgroundClr;
518b6262a25Sjimtabor pgO->crBrushClr = pdcattr->crBrushClr;
519b6262a25Sjimtabor pgO->ulForegroundClr = pdcattr->ulForegroundClr;
520b6262a25Sjimtabor pgO->ulBackgroundClr = pdcattr->ulBackgroundClr;
521b6262a25Sjimtabor pgO->ulBrushClr = pdcattr->ulBrushClr;
522b6262a25Sjimtabor return TRUE;
523b6262a25Sjimtabor }
524b6262a25Sjimtabor }
525c2c66affSColin Finck return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
526c2c66affSColin Finck }
527c2c66affSColin Finck
528c2c66affSColin Finck BOOL
529c2c66affSColin Finck WINAPI
PolyPatBlt(_In_ HDC hdc,_In_ DWORD dwRop,_In_ PPOLYPATBLT pPoly,_In_ DWORD nCount,_In_ DWORD dwMode)530c2c66affSColin Finck PolyPatBlt(
531c2c66affSColin Finck _In_ HDC hdc,
532c2c66affSColin Finck _In_ DWORD dwRop,
533c2c66affSColin Finck _In_ PPOLYPATBLT pPoly,
534c2c66affSColin Finck _In_ DWORD nCount,
535c2c66affSColin Finck _In_ DWORD dwMode)
536c2c66affSColin Finck {
537c2c66affSColin Finck UINT i;
538c2c66affSColin Finck BOOL bResult;
539c2c66affSColin Finck HBRUSH hbrOld;
540b6262a25Sjimtabor PDC_ATTR pdcattr;
541c2c66affSColin Finck
542c2c66affSColin Finck /* Handle meta DCs */
543c2c66affSColin Finck if ((GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_METADC16_TYPE) ||
544c2c66affSColin Finck (GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_ALTDC_TYPE))
545c2c66affSColin Finck {
546c2c66affSColin Finck if (!GdiValidateHandle(hdc))
547c2c66affSColin Finck {
548c2c66affSColin Finck return FALSE;
549c2c66affSColin Finck }
550c2c66affSColin Finck
551c2c66affSColin Finck /* Save the current DC brush */
552c2c66affSColin Finck hbrOld = SelectObject(hdc, GetStockObject(DC_BRUSH));
553c2c66affSColin Finck
554c2c66affSColin Finck /* Assume success */
555c2c66affSColin Finck bResult = TRUE;
556c2c66affSColin Finck
557c2c66affSColin Finck /* Loop all rect */
558c2c66affSColin Finck for (i = 0; i < nCount; i++)
559c2c66affSColin Finck {
560c2c66affSColin Finck /* Select the brush for this rect */
561c2c66affSColin Finck SelectObject(hdc, pPoly[i].hBrush);
562c2c66affSColin Finck
563c2c66affSColin Finck /* Do the PatBlt operation for this rect */
564c2c66affSColin Finck bResult &= PatBlt(hdc,
565c2c66affSColin Finck pPoly[i].nXLeft,
566c2c66affSColin Finck pPoly[i].nYLeft,
567c2c66affSColin Finck pPoly[i].nWidth,
568c2c66affSColin Finck pPoly[i].nHeight,
569c2c66affSColin Finck dwRop);
570c2c66affSColin Finck }
571c2c66affSColin Finck
572c2c66affSColin Finck /* Restore the old brush */
573c2c66affSColin Finck SelectObject(hdc, hbrOld);
574c2c66affSColin Finck
575c2c66affSColin Finck return bResult;
576c2c66affSColin Finck }
577c2c66affSColin Finck
578b6262a25Sjimtabor /* Get the DC attribute */
579b6262a25Sjimtabor pdcattr = GdiGetDcAttr(hdc);
580b6262a25Sjimtabor if (nCount && pdcattr && !(pdcattr->ulDirty_ & DC_DIBSECTION))
581b6262a25Sjimtabor {
582b6262a25Sjimtabor PGDIBSPPATBLT pgO;
583b6262a25Sjimtabor PTEB pTeb = NtCurrentTeb();
584b6262a25Sjimtabor
585b6262a25Sjimtabor pgO = GdiAllocBatchCommand(hdc, GdiBCPolyPatBlt);
586b6262a25Sjimtabor if (pgO)
587b6262a25Sjimtabor {
588d57f7becSJames Tabor USHORT cjSize = 0;
589d57f7becSJames Tabor if (nCount > 1) cjSize = (nCount-1) * sizeof(PATRECT);
590b6262a25Sjimtabor
591b6262a25Sjimtabor if ((pTeb->GdiTebBatch.Offset + cjSize) <= GDIBATCHBUFSIZE)
592b6262a25Sjimtabor {
593b751c31cSJames Tabor pdcattr->ulDirty_ |= DC_MODE_DIRTY;
594b6262a25Sjimtabor pgO->Count = nCount;
595b6262a25Sjimtabor pgO->Mode = dwMode;
596b6262a25Sjimtabor pgO->rop4 = dwRop;
597b6262a25Sjimtabor /* Snapshot attributes */
598b6262a25Sjimtabor pgO->crForegroundClr = pdcattr->crForegroundClr;
599b6262a25Sjimtabor pgO->crBackgroundClr = pdcattr->crBackgroundClr;
600b6262a25Sjimtabor pgO->crBrushClr = pdcattr->crBrushClr;
601b6262a25Sjimtabor pgO->ulForegroundClr = pdcattr->ulForegroundClr;
602b6262a25Sjimtabor pgO->ulBackgroundClr = pdcattr->ulBackgroundClr;
603b6262a25Sjimtabor pgO->ulBrushClr = pdcattr->ulBrushClr;
604b6262a25Sjimtabor RtlCopyMemory(pgO->pRect, pPoly, nCount * sizeof(PATRECT));
605d57f7becSJames Tabor // Recompute offset and return size, remember one is already accounted for in the structure.
606d57f7becSJames Tabor pTeb->GdiTebBatch.Offset += cjSize;
607d57f7becSJames Tabor ((PGDIBATCHHDR)pgO)->Size += cjSize;
608b6262a25Sjimtabor return TRUE;
609b6262a25Sjimtabor }
610d57f7becSJames Tabor // Reset offset and count then fall through
611d57f7becSJames Tabor pTeb->GdiTebBatch.Offset -= sizeof(GDIBSPPATBLT);
612d57f7becSJames Tabor pTeb->GdiBatchCount--;
613b6262a25Sjimtabor }
614b6262a25Sjimtabor }
615c2c66affSColin Finck return NtGdiPolyPatBlt(hdc, dwRop, pPoly, nCount, dwMode);
616c2c66affSColin Finck }
617c2c66affSColin Finck
618c2c66affSColin Finck /*
619c2c66affSColin Finck * @implemented
620c2c66affSColin Finck */
621c2c66affSColin Finck BOOL
622c2c66affSColin Finck 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)623c2c66affSColin Finck StretchBlt(
624c2c66affSColin Finck _In_ HDC hdcDest,
625c2c66affSColin Finck _In_ INT xDest,
626c2c66affSColin Finck _In_ INT yDest,
627c2c66affSColin Finck _In_ INT cxDest,
628c2c66affSColin Finck _In_ INT cyDest,
629c2c66affSColin Finck _In_opt_ HDC hdcSrc,
630c2c66affSColin Finck _In_ INT xSrc,
631c2c66affSColin Finck _In_ INT ySrc,
632c2c66affSColin Finck _In_ INT cxSrc,
633c2c66affSColin Finck _In_ INT cySrc,
634c2c66affSColin Finck _In_ DWORD dwRop)
635c2c66affSColin Finck {
636c2c66affSColin Finck HANDLE_METADC(BOOL,
637c2c66affSColin Finck StretchBlt,
638c2c66affSColin Finck FALSE,
639c2c66affSColin Finck hdcDest,
640c2c66affSColin Finck xDest,
641c2c66affSColin Finck yDest,
642c2c66affSColin Finck cxDest,
643c2c66affSColin Finck cyDest,
644c2c66affSColin Finck hdcSrc,
645c2c66affSColin Finck xSrc,
646c2c66affSColin Finck ySrc,
647c2c66affSColin Finck cxSrc,
648c2c66affSColin Finck cySrc,
649c2c66affSColin Finck dwRop);
650c2c66affSColin Finck
65166587152Sjimtabor if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
65266587152Sjimtabor
653c2c66affSColin Finck return NtGdiStretchBlt(hdcDest,
654c2c66affSColin Finck xDest,
655c2c66affSColin Finck yDest,
656c2c66affSColin Finck cxDest,
657c2c66affSColin Finck cyDest,
658c2c66affSColin Finck hdcSrc,
659c2c66affSColin Finck xSrc,
660c2c66affSColin Finck ySrc,
661c2c66affSColin Finck cxSrc,
662c2c66affSColin Finck cySrc,
663c2c66affSColin Finck dwRop,
664c2c66affSColin Finck 0);
665c2c66affSColin Finck }
666c2c66affSColin Finck
667c2c66affSColin Finck
668c2c66affSColin Finck /*
669c2c66affSColin Finck * @implemented
670c2c66affSColin Finck */
671c2c66affSColin Finck BOOL
672c2c66affSColin Finck 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)673c2c66affSColin Finck MaskBlt(
674c2c66affSColin Finck _In_ HDC hdcDest,
675c2c66affSColin Finck _In_ INT xDest,
676c2c66affSColin Finck _In_ INT yDest,
677c2c66affSColin Finck _In_ INT cx,
678c2c66affSColin Finck _In_ INT cy,
679c2c66affSColin Finck _In_ HDC hdcSrc,
680c2c66affSColin Finck _In_ INT xSrc,
681c2c66affSColin Finck _In_ INT ySrc,
682c2c66affSColin Finck _In_ HBITMAP hbmMask,
683c2c66affSColin Finck _In_ INT xMask,
684c2c66affSColin Finck _In_ INT yMask,
685c2c66affSColin Finck _In_ DWORD dwRop)
686c2c66affSColin Finck {
687*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL,
688c2c66affSColin Finck MaskBlt,
689c2c66affSColin Finck FALSE,
690c2c66affSColin Finck hdcDest,
691c2c66affSColin Finck xDest,
692c2c66affSColin Finck yDest,
693c2c66affSColin Finck cx,
694c2c66affSColin Finck cy,
695c2c66affSColin Finck hdcSrc,
696c2c66affSColin Finck xSrc,
697c2c66affSColin Finck ySrc,
698c2c66affSColin Finck hbmMask,
699c2c66affSColin Finck xMask,
700c2c66affSColin Finck yMask,
701c2c66affSColin Finck dwRop);
702c2c66affSColin Finck
70366587152Sjimtabor if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
70466587152Sjimtabor
705c2c66affSColin Finck return NtGdiMaskBlt(hdcDest,
706c2c66affSColin Finck xDest,
707c2c66affSColin Finck yDest,
708c2c66affSColin Finck cx,
709c2c66affSColin Finck cy,
710c2c66affSColin Finck hdcSrc,
711c2c66affSColin Finck xSrc,
712c2c66affSColin Finck ySrc,
713c2c66affSColin Finck hbmMask,
714c2c66affSColin Finck xMask,
715c2c66affSColin Finck yMask,
716c2c66affSColin Finck dwRop,
717c2c66affSColin Finck GetBkColor(hdcSrc));
718c2c66affSColin Finck }
719c2c66affSColin Finck
720c2c66affSColin Finck
721c2c66affSColin Finck /*
722c2c66affSColin Finck * @implemented
723c2c66affSColin Finck */
724c2c66affSColin Finck BOOL
725c2c66affSColin Finck WINAPI
726c2c66affSColin Finck PlgBlt(
727c2c66affSColin Finck _In_ HDC hdcDest,
728c2c66affSColin Finck _In_reads_(3) const POINT * ppt,
729c2c66affSColin Finck _In_ HDC hdcSrc,
730c2c66affSColin Finck _In_ INT xSrc,
731c2c66affSColin Finck _In_ INT ySrc,
732c2c66affSColin Finck _In_ INT cx,
733c2c66affSColin Finck _In_ INT cy,
734c2c66affSColin Finck _In_opt_ HBITMAP hbmMask,
735c2c66affSColin Finck _In_ INT xMask,
736c2c66affSColin Finck _In_ INT yMask)
737c2c66affSColin Finck {
738*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL,
739c2c66affSColin Finck PlgBlt,
740c2c66affSColin Finck FALSE,
741c2c66affSColin Finck hdcDest,
742c2c66affSColin Finck ppt,
743c2c66affSColin Finck hdcSrc,
744c2c66affSColin Finck xSrc,
745c2c66affSColin Finck ySrc,
746c2c66affSColin Finck cx,
747c2c66affSColin Finck cy,
748c2c66affSColin Finck hbmMask,
749c2c66affSColin Finck xMask,
750c2c66affSColin Finck yMask);
751c2c66affSColin Finck
75266587152Sjimtabor if ( GdiConvertAndCheckDC(hdcDest) == NULL ) return FALSE;
75366587152Sjimtabor
754c2c66affSColin Finck return NtGdiPlgBlt(hdcDest,
755c2c66affSColin Finck (LPPOINT)ppt,
756c2c66affSColin Finck hdcSrc,
757c2c66affSColin Finck xSrc,
758c2c66affSColin Finck ySrc,
759c2c66affSColin Finck cx,
760c2c66affSColin Finck cy,
761c2c66affSColin Finck hbmMask,
762c2c66affSColin Finck xMask,
763c2c66affSColin Finck yMask,
764c2c66affSColin Finck GetBkColor(hdcSrc));
765c2c66affSColin Finck }
766c2c66affSColin Finck
767c2c66affSColin Finck BOOL
768c2c66affSColin Finck 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)769c2c66affSColin Finck GdiAlphaBlend(
770c2c66affSColin Finck _In_ HDC hdcDst,
771c2c66affSColin Finck _In_ INT xDst,
772c2c66affSColin Finck _In_ INT yDst,
773c2c66affSColin Finck _In_ INT cxDst,
774c2c66affSColin Finck _In_ INT cyDst,
775c2c66affSColin Finck _In_ HDC hdcSrc,
776c2c66affSColin Finck _In_ INT xSrc,
777c2c66affSColin Finck _In_ INT ySrc,
778c2c66affSColin Finck _In_ INT cxSrc,
779c2c66affSColin Finck _In_ INT cySrc,
780c2c66affSColin Finck _In_ BLENDFUNCTION blendfn)
781c2c66affSColin Finck {
782c2c66affSColin Finck if (hdcSrc == NULL ) return FALSE;
783c2c66affSColin Finck
784c2c66affSColin Finck if (GDI_HANDLE_GET_TYPE(hdcSrc) == GDI_OBJECT_TYPE_METADC) return FALSE;
785c2c66affSColin Finck
786*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL,
787c2c66affSColin Finck AlphaBlend,
788c2c66affSColin Finck FALSE,
789c2c66affSColin Finck hdcDst,
790c2c66affSColin Finck xDst,
791c2c66affSColin Finck yDst,
792c2c66affSColin Finck cxDst,
793c2c66affSColin Finck cyDst,
794c2c66affSColin Finck hdcSrc,
795c2c66affSColin Finck xSrc,
796c2c66affSColin Finck ySrc,
797c2c66affSColin Finck cxSrc,
798c2c66affSColin Finck cySrc,
799c2c66affSColin Finck blendfn);
800c2c66affSColin Finck
80166587152Sjimtabor if ( GdiConvertAndCheckDC(hdcDst) == NULL ) return FALSE;
80266587152Sjimtabor
803c2c66affSColin Finck return NtGdiAlphaBlend(hdcDst,
804c2c66affSColin Finck xDst,
805c2c66affSColin Finck yDst,
806c2c66affSColin Finck cxDst,
807c2c66affSColin Finck cyDst,
808c2c66affSColin Finck hdcSrc,
809c2c66affSColin Finck xSrc,
810c2c66affSColin Finck ySrc,
811c2c66affSColin Finck cxSrc,
812c2c66affSColin Finck cySrc,
813c2c66affSColin Finck blendfn,
814c2c66affSColin Finck 0);
815c2c66affSColin Finck }
816c2c66affSColin Finck
817c2c66affSColin Finck
818c2c66affSColin Finck /*
819c2c66affSColin Finck * @implemented
820c2c66affSColin Finck */
821c2c66affSColin Finck BOOL
822c2c66affSColin Finck 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)823c2c66affSColin Finck GdiTransparentBlt(
824c2c66affSColin Finck _In_ HDC hdcDst,
825c2c66affSColin Finck _In_ INT xDst,
826c2c66affSColin Finck _In_ INT yDst,
827c2c66affSColin Finck _In_ INT cxDst,
828c2c66affSColin Finck _In_ INT cyDst,
829c2c66affSColin Finck _In_ HDC hdcSrc,
830c2c66affSColin Finck _In_ INT xSrc,
831c2c66affSColin Finck _In_ INT ySrc,
832c2c66affSColin Finck _In_ INT cxSrc,
833c2c66affSColin Finck _In_ INT cySrc,
834c2c66affSColin Finck _In_ UINT crTransparent)
835c2c66affSColin Finck {
836*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL,
837c2c66affSColin Finck TransparentBlt,
838c2c66affSColin Finck FALSE,
839c2c66affSColin Finck hdcDst,
840c2c66affSColin Finck xDst,
841c2c66affSColin Finck yDst,
842c2c66affSColin Finck cxDst,
843c2c66affSColin Finck cyDst,
844c2c66affSColin Finck hdcSrc,
845c2c66affSColin Finck xSrc,
846c2c66affSColin Finck ySrc,
847c2c66affSColin Finck cxSrc,
848c2c66affSColin Finck cySrc,
849c2c66affSColin Finck crTransparent);
850c2c66affSColin Finck
85166587152Sjimtabor if ( GdiConvertAndCheckDC(hdcDst) == NULL ) return FALSE;
85266587152Sjimtabor
853c2c66affSColin Finck return NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, crTransparent);
854c2c66affSColin Finck }
855c2c66affSColin Finck
856c2c66affSColin Finck /*
857c2c66affSColin Finck * @implemented
858c2c66affSColin Finck */
859c2c66affSColin Finck BOOL
860c2c66affSColin Finck WINAPI
GdiGradientFill(_In_ HDC hdc,_In_reads_ (nVertex)PTRIVERTEX pVertex,_In_ ULONG nVertex,_In_ PVOID pMesh,_In_ ULONG nCount,_In_ ULONG ulMode)861c2c66affSColin Finck GdiGradientFill(
862c2c66affSColin Finck _In_ HDC hdc,
863c2c66affSColin Finck _In_reads_(nVertex) PTRIVERTEX pVertex,
864c2c66affSColin Finck _In_ ULONG nVertex,
865c2c66affSColin Finck _In_ PVOID pMesh,
866c2c66affSColin Finck _In_ ULONG nCount,
867c2c66affSColin Finck _In_ ULONG ulMode)
868c2c66affSColin Finck {
869*fc16259fSJames Tabor if (GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_METADC16_TYPE) return TRUE;
870*fc16259fSJames Tabor
871*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, GradientFill, FALSE, hdc, pVertex, nVertex, pMesh, nCount, ulMode);
872c2c66affSColin Finck
87366587152Sjimtabor if ( GdiConvertAndCheckDC(hdc) == NULL ) return FALSE;
87466587152Sjimtabor
875c2c66affSColin Finck return NtGdiGradientFill(hdc, pVertex, nVertex, pMesh, nCount, ulMode);
876c2c66affSColin Finck }
877