ReactOS 0.4.17-dev-116-ga4b6fe9
metafile.c
Go to the documentation of this file.
1/*
2 * Unit tests for metafile functions
3 *
4 * Copyright (c) 2002 Dmitry Timoshkov
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <assert.h>
22#include <stdio.h>
23#include <math.h>
24
25#include "wine/test.h"
26#include "winbase.h"
27#include "wingdi.h"
28#include "winuser.h"
29#include "winerror.h"
30
33
34/* Arbitrarily chosen values for the second co-ordinate of a metafile line */
35#define LINE_X 55.0f
36#define LINE_Y 15.0f
37
38static INT (WINAPI * pGetRelAbs)(HDC, DWORD);
39static INT (WINAPI * pSetRelAbs)(HDC, INT);
40static COLORREF (WINAPI *pSetDCBrushColor)(HDC,COLORREF);
41static COLORREF (WINAPI *pSetDCPenColor)(HDC,COLORREF);
42
43#define GDI_GET_PROC(func) \
44 p ## func = (void *)GetProcAddress(hGDI, #func); \
45 if(!p ## func) \
46 trace("GetProcAddress(hGDI, \"%s\") failed\n", #func); \
47
48static void init_function_pointers(void)
49{
50 HMODULE hGDI;
51
52 pGetRelAbs = NULL;
53 pSetRelAbs = NULL;
54
55 hGDI = GetModuleHandleA("gdi32.dll");
56 assert(hGDI);
61}
62
64 const ENHMETARECORD *emr, int n_objs, LPARAM param)
65{
66 static int n_record;
67 DWORD i;
68 const INT *dx;
69 INT *orig_dx = (INT *)param;
70 LOGFONTA device_lf;
71 INT ret;
72
73 if(!hdc) return 1;
74
76
77 switch (emr->iType)
78 {
79 case EMR_HEADER:
80 ok(GetTextAlign(hdc) == 0, "text align %08x\n", GetTextAlign(hdc));
81 ok(GetBkColor(hdc) == RGB(0xff, 0xff, 0xff), "bk color %08lx\n", GetBkColor(hdc));
82 ok(GetTextColor(hdc) == RGB(0x0, 0x0, 0x0), "text color %08lx\n", GetTextColor(hdc));
83 ok(GetROP2(hdc) == R2_COPYPEN, "rop %d\n", GetROP2(hdc));
85 ok(GetPolyFillMode(hdc) == ALTERNATE, "poly fill %d\n", GetPolyFillMode(hdc));
86 ok(GetStretchBltMode(hdc) == BLACKONWHITE, "stretchblt mode %d\n", GetStretchBltMode(hdc));
87
88 /* GetBkMode, GetRelAbs do not get reset to the default value */
89 ok(GetBkMode(hdc) == OPAQUE, "bk mode %d\n", GetBkMode(hdc));
90 if(pSetRelAbs && pGetRelAbs)
91 ok(pGetRelAbs(hdc, 0) == RELATIVE, "relabs %d\n", pGetRelAbs(hdc, 0));
92
93 n_record = 0;
94 break;
95
96 case EMR_EXTTEXTOUTA:
97 {
98 const EMREXTTEXTOUTA *emr_ExtTextOutA = (const EMREXTTEXTOUTA *)emr;
99 dx = (const INT *)((const char *)emr + emr_ExtTextOutA->emrtext.offDx);
100
101 ret = GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(device_lf), &device_lf);
102 ok( ret == sizeof(device_lf), "GetObjectA error %ld\n", GetLastError());
103
104 /* compare up to lfOutPrecision, other values are not interesting,
105 * and in fact sometimes arbitrary adapted by Win9x.
106 */
107 ok(!memcmp(&orig_lf, &device_lf, FIELD_OFFSET(LOGFONTA, lfOutPrecision)), "fonts don't match\n");
108 ok(!lstrcmpA(orig_lf.lfFaceName, device_lf.lfFaceName), "font names don't match\n");
109
110 for(i = 0; i < emr_ExtTextOutA->emrtext.nChars; i++)
111 {
112 ok(orig_dx[i] == dx[i], "pass %d: dx[%ld] (%d) didn't match %d\n",
113 n_record, i, dx[i], orig_dx[i]);
114 }
115 n_record++;
117 break;
118 }
119
120 case EMR_EXTTEXTOUTW:
121 {
122 const EMREXTTEXTOUTW *emr_ExtTextOutW = (const EMREXTTEXTOUTW *)emr;
123 dx = (const INT *)((const char *)emr + emr_ExtTextOutW->emrtext.offDx);
124
125 SetLastError(0xdeadbeef);
126 ret = GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(device_lf), &device_lf);
127 ok( ret == sizeof(device_lf) ||
128 broken(ret == (sizeof(device_lf) - LF_FACESIZE + strlen(device_lf.lfFaceName) + 1)), /* NT4 */
129 "GetObjectA error %ld\n", GetLastError());
130
131 /* compare up to lfOutPrecision, other values are not interesting,
132 * and in fact sometimes arbitrary adapted by Win9x.
133 */
134 ok(!memcmp(&orig_lf, &device_lf, FIELD_OFFSET(LOGFONTA, lfOutPrecision)), "fonts don't match\n");
135 ok(!lstrcmpA(orig_lf.lfFaceName, device_lf.lfFaceName), "font names don't match\n");
136
137 ok(!emr_ExtTextOutW->rclBounds.left, "emr_ExtTextOutW->rclBounds.left = %ld\n",
138 emr_ExtTextOutW->rclBounds.left);
139 ok(emr_ExtTextOutW->rclBounds.right != -1, "emr_ExtTextOutW->rclBounds.right = %ld\n",
140 emr_ExtTextOutW->rclBounds.right);
141 ok(emr_ExtTextOutW->rclBounds.bottom != -1, "emr_ExtTextOutW->rclBounds.bottom = %ld\n",
142 emr_ExtTextOutW->rclBounds.bottom);
143
144 if(emr_ExtTextOutW->emrtext.fOptions & ETO_PDY)
145 {
146 ok(emr_ExtTextOutW->rclBounds.top < 0, "emr_ExtTextOutW->rclBounds.top = %ld\n",
147 emr_ExtTextOutW->rclBounds.top);
148 for(i = 0; i < emr_ExtTextOutW->emrtext.nChars * 2; i++)
149 {
150 ok(orig_dx[i] == dx[i], "pass %d: dx[%ld] (%d) didn't match %d\n",
151 n_record, i, dx[i], orig_dx[i]);
152 }
153 }
154 else
155 {
156 for(i = 0; i < emr_ExtTextOutW->emrtext.nChars; i++)
157 {
158 ok(orig_dx[2 * i] == dx[i], "pass %d: dx[%ld] (%d) didn't match %d\n",
159 n_record, i, dx[i], orig_dx[i]);
160 }
161 }
162 n_record++;
164 break;
165 }
166
167 default:
168 break;
169 }
170
171 return 1;
172}
173
174static void test_ExtTextOut(void)
175{
176 HWND hwnd;
177 HDC hdcDisplay, hdcMetafile;
178 HENHMETAFILE hMetafile;
179 HFONT hFont;
180 static const char text[] = "Simple text to test ExtTextOut on metafiles";
181 INT i, len, dx[256];
182 static const RECT rc = { 0, 0, 100, 100 };
183 BOOL ret;
184
186
187 /* Win9x doesn't play EMFs on invisible windows */
188 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
189 0, 0, 200, 200, 0, 0, 0, NULL);
190 ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError());
191
192 hdcDisplay = GetDC(hwnd);
193 ok(hdcDisplay != 0, "GetDC error %ld\n", GetLastError());
194
195 SetMapMode(hdcDisplay, MM_TEXT);
196
197 memset(&orig_lf, 0, sizeof(orig_lf));
198
202 orig_lf.lfHeight = 7;
204 lstrcpyA(orig_lf.lfFaceName, "Arial");
206 ok(hFont != 0, "CreateFontIndirectA error %ld\n", GetLastError());
207
208 hFont = SelectObject(hdcDisplay, hFont);
209
210 len = lstrlenA(text);
211 for (i = 0; i < len; i++)
212 {
213 ret = GetCharWidthA(hdcDisplay, text[i], text[i], &dx[i]);
214 ok( ret, "GetCharWidthA error %ld\n", GetLastError());
215 }
216 hFont = SelectObject(hdcDisplay, hFont);
217
218 hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL);
219 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
220
221 ok(GetDeviceCaps(hdcMetafile, TECHNOLOGY) == DT_RASDISPLAY,
222 "GetDeviceCaps(TECHNOLOGY) has to return DT_RASDISPLAY for a display based EMF\n");
223
224 hFont = SelectObject(hdcMetafile, hFont);
225
226 /* 1. pass NULL lpDx */
227 ret = ExtTextOutA(hdcMetafile, 0, 0, 0, &rc, text, lstrlenA(text), NULL);
228 ok( ret, "ExtTextOutA error %ld\n", GetLastError());
229
230 ret = ExtTextOutA(hdcMetafile, 0, 0, ETO_PDY, &rc, text, len, NULL);
231 ok( !ret, "ExtTextOutA succeeded\n");
232
233 /* 2. pass custom lpDx */
234 ret = ExtTextOutA(hdcMetafile, 0, 20, 0, &rc, text, lstrlenA(text), dx);
235 ok( ret, "ExtTextOutA error %ld\n", GetLastError());
236
237 for (i = len - 1; i >= 0; i--)
238 {
239 dx[2 * i] = dx[i];
240 dx[2 * i + 1] = 1;
241 }
242 ret = ExtTextOutA(hdcMetafile, 0, 20, ETO_PDY, &rc, text, len, dx);
243 ok( ret, "ExtTextOutA error %ld\n", GetLastError());
244
245 /* 3. pass NULL lprc */
246 ret = ExtTextOutA(hdcMetafile, 0, 40, 0, NULL, text, lstrlenA(text), NULL);
247 ok( ret, "ExtTextOutA error %ld\n", GetLastError());
248
249 /* 4. test with unmatched BeginPath/EndPath calls */
250 ret = BeginPath(hdcMetafile);
251 ok( ret, "BeginPath error %ld\n", GetLastError());
252 ret = BeginPath(hdcMetafile);
253 ok( ret, "BeginPath error %ld\n", GetLastError());
254 ret = EndPath(hdcMetafile);
255 ok( ret, "BeginPath error %ld\n", GetLastError());
256 ret = ExtTextOutA(hdcMetafile, 0, 60, 0, NULL, text, lstrlenA(text), NULL);
257 ok( ret, "ExtTextOutA error %ld\n", GetLastError());
258
259 hFont = SelectObject(hdcMetafile, hFont);
261 ok( ret, "DeleteObject error %ld\n", GetLastError());
262
263 hMetafile = CloseEnhMetaFile(hdcMetafile);
264 ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
265
266 ok(!GetObjectType(hdcMetafile), "CloseEnhMetaFile has to destroy metafile hdc\n");
267
268 ret = PlayEnhMetaFile(hdcDisplay, hMetafile, &rc);
269 ok( ret, "PlayEnhMetaFile error %ld\n", GetLastError());
270
272 SetBkColor(hdcDisplay, RGB(0xff, 0, 0));
273 SetTextColor(hdcDisplay, RGB(0, 0xff, 0));
274 SetROP2(hdcDisplay, R2_NOT);
275 SetArcDirection(hdcDisplay, AD_CLOCKWISE);
276 SetPolyFillMode(hdcDisplay, WINDING);
277 SetStretchBltMode(hdcDisplay, HALFTONE);
278
279 if(pSetRelAbs) pSetRelAbs(hdcDisplay, RELATIVE);
280 SetBkMode(hdcDisplay, OPAQUE);
281
282 ret = EnumEnhMetaFile(hdcDisplay, hMetafile, eto_emf_enum_proc, dx, &rc);
283 ok( ret, "EnumEnhMetaFile error %ld\n", GetLastError());
284
286 "text align %08x\n", GetTextAlign(hdcDisplay));
287 ok( GetBkColor(hdcDisplay) == RGB(0xff, 0, 0), "bk color %08lx\n", GetBkColor(hdcDisplay));
288 ok( GetTextColor(hdcDisplay) == RGB(0, 0xff, 0), "text color %08lx\n", GetTextColor(hdcDisplay));
289 ok( GetROP2(hdcDisplay) == R2_NOT, "rop2 %d\n", GetROP2(hdcDisplay));
290 ok( GetArcDirection(hdcDisplay) == AD_CLOCKWISE, "arc dir %d\n", GetArcDirection(hdcDisplay));
291 ok( GetPolyFillMode(hdcDisplay) == WINDING, "poly fill %d\n", GetPolyFillMode(hdcDisplay));
292 ok( GetStretchBltMode(hdcDisplay) == HALFTONE, "stretchblt mode %d\n", GetStretchBltMode(hdcDisplay));
293
294 ok(emr_processed, "EnumEnhMetaFile couldn't find EMR_EXTTEXTOUTA or EMR_EXTTEXTOUTW record\n");
295
296 ok(!EnumEnhMetaFile(hdcDisplay, hMetafile, eto_emf_enum_proc, dx, NULL),
297 "A valid hdc has to require a valid rc\n");
298
300 "A null hdc does not require a valid rc\n");
301
302 ret = DeleteEnhMetaFile(hMetafile);
303 ok( ret, "DeleteEnhMetaFile error %ld\n", GetLastError());
304 ret = ReleaseDC(hwnd, hdcDisplay);
305 ok( ret, "ReleaseDC error %ld\n", GetLastError());
307}
308
310{
313 double ex_scale;
314 double ey_scale;
316};
317
319 const ENHMETARECORD *emr, int n_objs, LPARAM param)
320{
322
323 if (emr->iType == EMR_EXTTEXTOUTW)
324 {
325 const EMREXTTEXTOUTW *pExtTextOutW = (const EMREXTTEXTOUTW *)emr;
326 ok(fabs(test->ex_scale - pExtTextOutW->exScale) < 0.001,
327 "Got exScale %f, expected %f\n", pExtTextOutW->exScale, test->ex_scale);
328 ok(fabs(test->ey_scale - pExtTextOutW->eyScale) < 0.001,
329 "Got eyScale %f, expected %f\n", pExtTextOutW->eyScale, test->ey_scale);
330 test->processed = TRUE;
331 }
332
333 return 1;
334}
335
336static void test_ExtTextOutScale(void)
337{
338 const RECT rc = { 0, 0, 100, 100 };
340 HDC hdcDisplay, hdcMetafile;
341 HENHMETAFILE hMetafile;
342 HWND hwnd;
343 SIZE wndext, vportext;
344 int horzSize, vertSize, horzRes, vertRes;
345 int ret;
346 int i;
347
348 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
349 0, 0, 200, 200, 0, 0, 0, NULL);
350 ok(hwnd != 0, "CreateWindowExA failed\n");
351
352 hdcDisplay = GetDC(hwnd);
353 ok(hdcDisplay != 0, "GetDC failed\n");
354
355 horzSize = GetDeviceCaps(hdcDisplay, HORZSIZE);
356 horzRes = GetDeviceCaps(hdcDisplay, HORZRES);
357 vertSize = GetDeviceCaps(hdcDisplay, VERTSIZE);
358 vertRes = GetDeviceCaps(hdcDisplay, VERTRES);
359 ok(horzSize && horzRes && vertSize && vertRes, "GetDeviceCaps failed\n");
360
361 for (i = 0; i < 16; i++)
362 {
363 test.graphics_mode = i / 8 + 1;
364 test.map_mode = i % 8 + 1;
365
366 ret = SetGraphicsMode(hdcDisplay, test.graphics_mode);
367 ok(ret, "SetGraphicsMode failed\n");
368 ret = SetMapMode(hdcDisplay, test.map_mode);
369 ok(ret, "SetMapMode failed\n");
370
371 if ((test.map_mode == MM_ISOTROPIC) || (test.map_mode == MM_ANISOTROPIC))
372 {
373 ret = SetWindowExtEx(hdcDisplay, 1, 1, NULL);
374 ok(ret, "SetWindowExtEx failed\n");
375 ret = SetViewportExtEx(hdcDisplay, -20, -10, NULL);
376 ok(ret, "SetViewportExtEx failed\n");
377 }
378
379 ret = GetViewportExtEx(hdcDisplay, &vportext);
380 ok(ret, "GetViewportExtEx failed\n");
381 ret = GetWindowExtEx(hdcDisplay, &wndext);
382 ok(ret, "GetWindowExtEx failed\n");
383
384 if (winetest_debug > 1)
385 trace("gm %d, mm %d, wnd %ld,%ld, vp %ld,%ld horz %d,%d vert %d,%d\n",
386 test.graphics_mode, test.map_mode,
387 wndext.cx, wndext.cy, vportext.cx, vportext.cy,
388 horzSize, horzRes, vertSize, vertRes);
389
390 if (test.graphics_mode == GM_COMPATIBLE)
391 {
392 test.ex_scale = 100.0 * ((FLOAT)horzSize / (FLOAT)horzRes) /
393 ((FLOAT)wndext.cx / (FLOAT)vportext.cx);
394 test.ey_scale = 100.0 * ((FLOAT)vertSize / (FLOAT)vertRes) /
395 ((FLOAT)wndext.cy / (FLOAT)vportext.cy);
396 }
397 else
398 {
399 test.ex_scale = 0.0;
400 test.ey_scale = 0.0;
401 }
402
403 hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL);
404 ok(hdcMetafile != 0, "CreateEnhMetaFileA failed\n");
405
406 ret = SetGraphicsMode(hdcMetafile, test.graphics_mode);
407 ok(ret, "SetGraphicsMode failed\n");
408 ret = SetMapMode(hdcMetafile, test.map_mode);
409 ok(ret, "SetMapMode failed\n");
410
411 if ((test.map_mode == MM_ISOTROPIC) || (test.map_mode == MM_ANISOTROPIC))
412 {
413 ret = SetWindowExtEx(hdcMetafile, 1, 1, NULL);
414 ok(ret, "SetWindowExtEx failed\n");
415 ret = SetViewportExtEx(hdcMetafile, -20, -10, NULL);
416 ok(ret, "SetViewportExtEx failed\n");
417 }
418
419 ret = ExtTextOutW(hdcMetafile, 0, 0, 0, 0, L"a", 1, NULL);
420 ok(ret, "ExtTextOutW failed\n");
421
422 hMetafile = CloseEnhMetaFile(hdcMetafile);
423 ok(hMetafile != 0, "CloseEnhMetaFile failed\n");
424
425 test.processed = 0;
426 ret = EnumEnhMetaFile(hdcDisplay, hMetafile, eto_scale_enum_proc, &test, &rc);
427 ok(ret, "EnumEnhMetaFile failed\n");
428 ok(test.processed, "EnumEnhMetaFile couldn't find EMR_EXTTEXTOUTW record\n");
429
430 ret = DeleteEnhMetaFile(hMetafile);
431 ok(ret, "DeleteEnhMetaFile failed\n");
432 }
433
434 ret = ReleaseDC(hwnd, hdcDisplay);
435 ok(ret, "ReleaseDC failed\n");
437}
438
439
440static void check_dc_state(HDC hdc, int restore_no,
441 int wnd_org_x, int wnd_org_y, int wnd_ext_x, int wnd_ext_y,
442 int vp_org_x, int vp_org_y, int vp_ext_x, int vp_ext_y)
443{
444 BOOL ret;
445 XFORM xform;
446 FLOAT xscale, yscale, edx, edy;
447
448 SetLastError(0xdeadbeef);
449 ret = GetWorldTransform(hdc, &xform);
450 ok(ret, "GetWorldTransform error %lu\n", GetLastError());
451
452 if (winetest_debug > 1)
453 trace("%d: eM11 %f, eM22 %f, eDx %f, eDy %f\n", restore_no, xform.eM11,
454 xform.eM22, xform.eDx, xform.eDy);
455
456 ok(xform.eM12 == 0.0, "%d: expected eM12 0.0, got %f\n", restore_no, xform.eM12);
457 ok(xform.eM21 == 0.0, "%d: expected eM21 0.0, got %f\n", restore_no, xform.eM21);
458
459 xscale = (FLOAT)vp_ext_x / (FLOAT)wnd_ext_x;
460 if (winetest_debug > 1) trace("x scale %f\n", xscale);
461 ok(fabs(xscale - xform.eM11) < 0.01, "%d: vp_ext_x %d, wnd_ext_cx %d, eM11 %f\n",
462 restore_no, vp_ext_x, wnd_ext_x, xform.eM11);
463
464 yscale = (FLOAT)vp_ext_y / (FLOAT)wnd_ext_y;
465 if (winetest_debug > 1) trace("y scale %f\n", yscale);
466 ok(fabs(yscale - xform.eM22) < 0.01, "%d: vp_ext_y %d, wnd_ext_y %d, eM22 %f\n",
467 restore_no, vp_ext_y, wnd_ext_y, xform.eM22);
468
469 edx = (FLOAT)vp_org_x - xform.eM11 * (FLOAT)wnd_org_x;
470 ok(fabs(edx - xform.eDx) < 0.01, "%d: edx %f != eDx %f\n", restore_no, edx, xform.eDx);
471 edy = (FLOAT)vp_org_y - xform.eM22 * (FLOAT)wnd_org_y;
472 ok(fabs(edy - xform.eDy) < 0.01, "%d: edy %f != eDy %f\n", restore_no, edy, xform.eDy);
473}
474
476 const ENHMETARECORD *emr, int n_objs, LPARAM param)
477{
478 BOOL ret;
479 XFORM xform;
480 POINT pt;
481 SIZE size;
482 static int save_state;
483 static int restore_no;
484 static int select_no;
485
486 if (winetest_debug > 1)
487 trace("hdc %p, emr->iType %ld, emr->nSize %ld, param %p\n",
488 hdc, emr->iType, emr->nSize, (void *)param);
489
490 SetLastError(0xdeadbeef);
491 ret = GetWorldTransform(hdc, &xform);
493 {
495 ok(ret, "GetWindowOrgEx error %lu\n", GetLastError());
496 trace("window org (%ld,%ld)\n", pt.x, pt.y);
498 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
499 trace("vport org (%ld,%ld)\n", pt.x, pt.y);
501 ok(ret, "GetWindowExtEx error %lu\n", GetLastError());
502 trace("window ext (%ld,%ld)\n", size.cx, size.cy);
504 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
505 trace("vport ext (%ld,%ld)\n", size.cx, size.cy);
506 }
507 else
508 {
509 ok(ret, "GetWorldTransform error %lu\n", GetLastError());
510 if (winetest_debug > 1)
511 trace("eM11 %f, eM22 %f, eDx %f, eDy %f\n", xform.eM11, xform.eM22, xform.eDx, xform.eDy);
512 }
513
515
516 switch (emr->iType)
517 {
518 case EMR_HEADER:
519 {
520 static RECT exp_bounds = { 0, 0, 150, 150 };
521 RECT bounds;
522 const ENHMETAHEADER *emf = (const ENHMETAHEADER *)emr;
523
524 if (winetest_debug > 1)
525 {
526 trace("bounds %ld,%ld-%ld,%ld, frame %ld,%ld-%ld,%ld\n",
527 emf->rclBounds.left, emf->rclBounds.top, emf->rclBounds.right, emf->rclBounds.bottom,
528 emf->rclFrame.left, emf->rclFrame.top, emf->rclFrame.right, emf->rclFrame.bottom);
529 trace("mm %ld x %ld, device %ld x %ld\n", emf->szlMillimeters.cx, emf->szlMillimeters.cy,
530 emf->szlDevice.cx, emf->szlDevice.cy);
531 }
532
533 SetRect(&bounds, emf->rclBounds.left, emf->rclBounds.top, emf->rclBounds.right, emf->rclBounds.bottom);
534 ok(EqualRect(&bounds, &exp_bounds), "wrong bounds\n");
535
536 save_state = 0;
537 restore_no = 0;
538 select_no = 0;
539 check_dc_state(hdc, restore_no, 0, 0, 1, 1, 0, 0, 1, 1);
540 break;
541 }
542
543 case EMR_LINETO:
544 {
545 const EMRLINETO *line = (const EMRLINETO *)emr;
546 if (winetest_debug > 1) trace("EMR_LINETO %ld,%ld\n", line->ptl.x, line->ptl.x);
547 break;
548 }
550 {
551 const EMRSETWINDOWORGEX *org = (const EMRSETWINDOWORGEX *)emr;
552 if (winetest_debug > 1)
553 trace("EMR_SETWINDOWORGEX: %ld,%ld\n", org->ptlOrigin.x, org->ptlOrigin.y);
554 break;
555 }
557 {
558 const EMRSETWINDOWEXTEX *ext = (const EMRSETWINDOWEXTEX *)emr;
559 if (winetest_debug > 1)
560 trace("EMR_SETWINDOWEXTEX: %ld,%ld\n", ext->szlExtent.cx, ext->szlExtent.cy);
561 break;
562 }
564 {
565 const EMRSETVIEWPORTORGEX *org = (const EMRSETVIEWPORTORGEX *)emr;
566 if (winetest_debug > 1)
567 trace("EMR_SETVIEWPORTORGEX: %ld,%ld\n", org->ptlOrigin.x, org->ptlOrigin.y);
568 break;
569 }
571 {
572 const EMRSETVIEWPORTEXTEX *ext = (const EMRSETVIEWPORTEXTEX *)emr;
573 if (winetest_debug > 1)
574 trace("EMR_SETVIEWPORTEXTEX: %ld,%ld\n", ext->szlExtent.cx, ext->szlExtent.cy);
575 break;
576 }
577 case EMR_SAVEDC:
578 save_state++;
579 if (winetest_debug > 1) trace("EMR_SAVEDC\n");
580 break;
581
582 case EMR_RESTOREDC:
583 {
584 const EMRRESTOREDC *restoredc = (const EMRRESTOREDC *)emr;
585 if (winetest_debug > 1) trace("EMR_RESTOREDC: %ld\n", restoredc->iRelative);
586
587 switch(++restore_no)
588 {
589 case 1:
590 ok(restoredc->iRelative == -1, "first restore %ld\n", restoredc->iRelative);
591 check_dc_state(hdc, restore_no, -2, -2, 8192, 8192, 20, 20, 20479, 20478);
592 break;
593 case 2:
594 ok(restoredc->iRelative == -3, "second restore %ld\n", restoredc->iRelative);
595 check_dc_state(hdc, restore_no, 0, 0, 16384, 16384, 0, 0, 17873, 17872);
596 break;
597 case 3:
598 ok(restoredc->iRelative == -2, "third restore %ld\n", restoredc->iRelative);
599 check_dc_state(hdc, restore_no, -4, -4, 32767, 32767, 40, 40, 3276, 3276);
600 break;
601 }
602 ok(restore_no <= 3, "restore_no %d\n", restore_no);
603 save_state += restoredc->iRelative;
604 break;
605 }
606 case EMR_SELECTOBJECT:
607 {
608 const EMRSELECTOBJECT *selectobj = (const EMRSELECTOBJECT*)emr;
609 if (winetest_debug > 1) trace("EMR_SELECTOBJECT: %lx\n",selectobj->ihObject);
610 select_no ++;
611 break;
612 }
613 case EMR_EOF:
614 ok(save_state == 0, "EOF save_state %d\n", save_state);
615 ok(select_no == 3, "Too many/few selects %i\n",select_no);
616 break;
617 }
618
619 SetLastError(0xdeadbeef);
620 ret = GetWorldTransform(hdc, &xform);
622 {
624 ok(ret, "GetWindowOrgEx error %lu\n", GetLastError());
625 if (winetest_debug > 1) trace("window org (%ld,%ld)\n", pt.x, pt.y);
627 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
628 if (winetest_debug > 1) trace("vport org (%ld,%ld)\n", pt.x, pt.y);
630 ok(ret, "GetWindowExtEx error %lu\n", GetLastError());
631 if (winetest_debug > 1) trace("window ext (%ld,%ld)\n", size.cx, size.cy);
633 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
634 if (winetest_debug > 1) trace("vport ext (%ld,%ld)\n", size.cx, size.cy);
635 }
636 else
637 {
638 ok(ret, "GetWorldTransform error %lu\n", GetLastError());
639 if (winetest_debug > 1)
640 trace("eM11 %f, eM22 %f, eDx %f, eDy %f\n", xform.eM11, xform.eM22, xform.eDx, xform.eDy);
641 }
642
643 return 1;
644}
645
646static void test_SaveDC(void)
647{
648 HDC hdcMetafile, hdcDisplay;
649 HENHMETAFILE hMetafile;
650 HWND hwnd;
651 int ret;
652 POINT pt;
653 SIZE size;
654 HFONT hFont,hFont2,hFontOld,hFontCheck;
655 static const RECT rc = { 0, 0, 150, 150 };
656
657 /* Win9x doesn't play EMFs on invisible windows */
658 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
659 0, 0, 200, 200, 0, 0, 0, NULL);
660 ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError());
661
662 hdcDisplay = GetDC(hwnd);
663 ok(hdcDisplay != 0, "GetDC error %ld\n", GetLastError());
664
665 hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL);
666 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
667
668 SetMapMode(hdcMetafile, MM_ANISOTROPIC);
669
670 /* Need to write something to the emf, otherwise Windows won't play it back */
671 LineTo(hdcMetafile, 150, 150);
672
673 SetWindowOrgEx(hdcMetafile, 0, 0, NULL);
674 SetViewportOrgEx(hdcMetafile, 0, 0, NULL);
675 SetWindowExtEx(hdcMetafile, 110, 110, NULL );
676 SetViewportExtEx(hdcMetafile, 120, 120, NULL );
677
678 /* Force Win9x to update DC state */
679 SetPixelV(hdcMetafile, 50, 50, 0);
680
681 ret = GetViewportOrgEx(hdcMetafile, &pt);
682 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
683 ok(pt.x == 0,"Expecting ViewportOrg x of 0, got %li\n",pt.x);
684 ret = GetViewportExtEx(hdcMetafile, &size);
685 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
686 ok(size.cx == 120,"Expecting ViewportExt cx of 120, got %li\n",size.cx);
687 ret = SaveDC(hdcMetafile);
688 ok(ret == 1, "ret = %d\n", ret);
689
690 SetWindowOrgEx(hdcMetafile, -1, -1, NULL);
691 SetViewportOrgEx(hdcMetafile, 10, 10, NULL);
692 SetWindowExtEx(hdcMetafile, 150, 150, NULL );
693 SetViewportExtEx(hdcMetafile, 200, 200, NULL );
694
695 /* Force Win9x to update DC state */
696 SetPixelV(hdcMetafile, 50, 50, 0);
697
698 ret = GetViewportOrgEx(hdcMetafile, &pt);
699 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
700 ok(pt.x == 10,"Expecting ViewportOrg x of 10, got %li\n",pt.x);
701 ret = GetViewportExtEx(hdcMetafile, &size);
702 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
703 ok(size.cx == 200,"Expecting ViewportExt cx of 200, got %li\n",size.cx);
704 ret = SaveDC(hdcMetafile);
705 ok(ret == 2, "ret = %d\n", ret);
706
707 SetWindowOrgEx(hdcMetafile, -2, -2, NULL);
708 SetViewportOrgEx(hdcMetafile, 20, 20, NULL);
709 SetWindowExtEx(hdcMetafile, 120, 120, NULL );
710 SetViewportExtEx(hdcMetafile, 300, 300, NULL );
711 SetPolyFillMode( hdcMetafile, ALTERNATE );
712 SetBkColor( hdcMetafile, 0 );
713
714 /* Force Win9x to update DC state */
715 SetPixelV(hdcMetafile, 50, 50, 0);
716
717 ret = GetViewportOrgEx(hdcMetafile, &pt);
718 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
719 ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %li\n",pt.x);
720 ret = GetViewportExtEx(hdcMetafile, &size);
721 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
722 ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %li\n",size.cx);
723 ret = SaveDC(hdcMetafile);
724 ok(ret == 3, "ret = %d\n", ret);
725
726 SetWindowOrgEx(hdcMetafile, -3, -3, NULL);
727 SetViewportOrgEx(hdcMetafile, 30, 30, NULL);
728 SetWindowExtEx(hdcMetafile, 200, 200, NULL );
729 SetViewportExtEx(hdcMetafile, 400, 400, NULL );
730
731 SetPolyFillMode( hdcMetafile, WINDING );
732 SetBkColor( hdcMetafile, 0x123456 );
733 ok( GetPolyFillMode( hdcMetafile ) == WINDING, "PolyFillMode not restored\n" );
734 ok( GetBkColor( hdcMetafile ) == 0x123456, "Background color not restored\n" );
735
736 /* Force Win9x to update DC state */
737 SetPixelV(hdcMetafile, 50, 50, 0);
738
739 ret = GetViewportOrgEx(hdcMetafile, &pt);
740 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
741 ok(pt.x == 30,"Expecting ViewportOrg x of 30, got %li\n",pt.x);
742 ret = GetViewportExtEx(hdcMetafile, &size);
743 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
744 ok(size.cx == 400,"Expecting ViewportExt cx of 400, got %li\n",size.cx);
745 ret = RestoreDC(hdcMetafile, -1);
746 ok(ret, "ret = %d\n", ret);
747
748 ret = GetViewportOrgEx(hdcMetafile, &pt);
749 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
750 ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %li\n",pt.x);
751 ret = GetViewportExtEx(hdcMetafile, &size);
752 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
753 ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %li\n",size.cx);
754 ok( GetPolyFillMode( hdcMetafile ) == ALTERNATE, "PolyFillMode not restored\n" );
755 ok( GetBkColor( hdcMetafile ) == 0, "Background color not restored\n" );
756 ret = SaveDC(hdcMetafile);
757 ok(ret == 3, "ret = %d\n", ret);
758
759 ret = GetViewportOrgEx(hdcMetafile, &pt);
760 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
761 ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %li\n",pt.x);
762 ret = GetViewportExtEx(hdcMetafile, &size);
763 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
764 ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %li\n",size.cx);
765 ret = RestoreDC(hdcMetafile, 1);
766 ok(ret, "ret = %d\n", ret);
767 ret = GetViewportOrgEx(hdcMetafile, &pt);
768 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
769 ok(pt.x == 0,"Expecting ViewportOrg x of 0, got %li\n",pt.x);
770 ret = GetViewportExtEx(hdcMetafile, &size);
771 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
772 ok(size.cx == 120,"Expecting ViewportExt cx of 120, got %li\n",size.cx);
773
774 SetWindowOrgEx(hdcMetafile, -4, -4, NULL);
775 SetViewportOrgEx(hdcMetafile, 40, 40, NULL);
776 SetWindowExtEx(hdcMetafile, 500, 500, NULL );
777 SetViewportExtEx(hdcMetafile, 50, 50, NULL );
778
779 /* Force Win9x to update DC state */
780 SetPixelV(hdcMetafile, 50, 50, 0);
781
782 ret = GetViewportOrgEx(hdcMetafile, &pt);
783 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
784 ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %li\n",pt.x);
785 ret = GetViewportExtEx(hdcMetafile, &size);
786 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
787 ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %li\n",size.cx);
788 ret = SaveDC(hdcMetafile);
789 ok(ret == 1, "ret = %d\n", ret);
790
791 ret = GetViewportOrgEx(hdcMetafile, &pt);
792 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
793 ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %li\n",pt.x);
794 ret = GetViewportExtEx(hdcMetafile, &size);
795 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
796 ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %li\n",size.cx);
797 ret = SaveDC(hdcMetafile);
798 ok(ret == 2, "ret = %d\n", ret);
799
800 memset(&orig_lf, 0, sizeof(orig_lf));
804 orig_lf.lfHeight = 7;
806 lstrcpyA(orig_lf.lfFaceName, "Arial");
808 ok(hFont != 0, "CreateFontIndirectA error %ld\n", GetLastError());
809
810 hFontOld = SelectObject(hdcMetafile, hFont);
811
812 hFont2 = CreateFontIndirectA(&orig_lf);
813 ok(hFont2 != 0, "CreateFontIndirectA error %ld\n", GetLastError());
814 hFontCheck = SelectObject(hdcMetafile, hFont2);
815 ok(hFontCheck == hFont, "Font not selected\n");
816
817 /* Force Win9x to update DC state */
818 SetPixelV(hdcMetafile, 50, 50, 0);
819
820 ret = RestoreDC(hdcMetafile, 1);
821 ok(ret, "ret = %d\n", ret);
822 ret = GetViewportOrgEx(hdcMetafile, &pt);
823 ok(ret, "GetViewportOrgEx error %lu\n", GetLastError());
824 ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %li\n",pt.x);
825 ret = GetViewportExtEx(hdcMetafile, &size);
826 ok(ret, "GetViewportExtEx error %lu\n", GetLastError());
827 ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %li\n",size.cx);
828
829 hFontCheck = SelectObject(hdcMetafile, hFontOld);
830 ok(hFontOld == hFontCheck && hFontCheck != hFont && hFontCheck != hFont2,
831 "Font not reverted with DC Restore\n");
832
833 ret = RestoreDC(hdcMetafile, -20);
834 ok(!ret, "ret = %d\n", ret);
835 ret = RestoreDC(hdcMetafile, 20);
836 ok(!ret, "ret = %d\n", ret);
837
838 hMetafile = CloseEnhMetaFile(hdcMetafile);
839 ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
840
841 ret = EnumEnhMetaFile(hdcDisplay, hMetafile, savedc_emf_enum_proc, 0, &rc);
842 ok( ret == 1, "EnumEnhMetaFile rets %d\n", ret);
843
845 ok( ret, "DeleteObject error %ld\n", GetLastError());
846 ret = DeleteObject(hFont2);
847 ok( ret, "DeleteObject error %ld\n", GetLastError());
848 ret = DeleteEnhMetaFile(hMetafile);
849 ok( ret, "DeleteEnhMetaFile error %ld\n", GetLastError());
850 ret = ReleaseDC(hwnd, hdcDisplay);
851 ok( ret, "ReleaseDC error %ld\n", GetLastError());
853}
854
855static void test_mf_SaveDC(void)
856{
857 HDC hdcMetafile;
858 HMETAFILE hMetafile;
859 int ret;
860 POINT pt;
861 SIZE size;
862 HFONT hFont,hFont2,hFontOld,hFontCheck;
863
864 hdcMetafile = CreateMetaFileA(NULL);
865 ok(hdcMetafile != 0, "CreateMetaFileA error %ld\n", GetLastError());
866
867 ret = SetMapMode(hdcMetafile, MM_ANISOTROPIC);
868 ok (ret, "SetMapMode should not fail\n");
869
870 /* Need to write something to the emf, otherwise Windows won't play it back */
871 LineTo(hdcMetafile, 150, 150);
872
873 pt.x = pt.y = 5555;
874 SetWindowOrgEx(hdcMetafile, 0, 0, &pt);
875 ok( pt.x == 5555 && pt.y == 5555, "wrong origin %ld,%ld\n", pt.x, pt.y);
876 pt.x = pt.y = 5555;
877 SetViewportOrgEx(hdcMetafile, 0, 0, &pt);
878 ok( pt.x == 5555 && pt.y == 5555, "wrong origin %ld,%ld\n", pt.x, pt.y);
879 size.cx = size.cy = 5555;
880 SetWindowExtEx(hdcMetafile, 110, 110, &size );
881 ok( size.cx == 5555 && size.cy == 5555, "wrong size %ld,%ld\n", size.cx, size.cy );
882 size.cx = size.cy = 5555;
883 SetViewportExtEx(hdcMetafile, 120, 120, &size );
884 ok( size.cx == 5555 && size.cy == 5555, "wrong size %ld,%ld\n", size.cx, size.cy );
885
886 /* Force Win9x to update DC state */
887 SetPixelV(hdcMetafile, 50, 50, 0);
888
889 ret = GetViewportOrgEx(hdcMetafile, &pt);
890 ok(!ret, "GetViewportOrgEx should fail\n");
891 ret = GetViewportExtEx(hdcMetafile, &size);
892 ok(!ret, "GetViewportExtEx should fail\n");
893 ret = SaveDC(hdcMetafile);
894 ok(ret == 1, "ret = %d\n", ret);
895
896 SetWindowOrgEx(hdcMetafile, -1, -1, NULL);
897 SetViewportOrgEx(hdcMetafile, 10, 10, NULL);
898 SetWindowExtEx(hdcMetafile, 150, 150, NULL );
899 SetViewportExtEx(hdcMetafile, 200, 200, NULL );
900
901 /* Force Win9x to update DC state */
902 SetPixelV(hdcMetafile, 50, 50, 0);
903
904 ret = SaveDC(hdcMetafile);
905 ok(ret == 1, "ret = %d\n", ret);
906
907 SetWindowOrgEx(hdcMetafile, -2, -2, NULL);
908 SetViewportOrgEx(hdcMetafile, 20, 20, NULL);
909 SetWindowExtEx(hdcMetafile, 120, 120, NULL );
910 SetViewportExtEx(hdcMetafile, 300, 300, NULL );
911
912 /* Force Win9x to update DC state */
913 SetPixelV(hdcMetafile, 50, 50, 0);
914 SetPolyFillMode( hdcMetafile, ALTERNATE );
915 SetBkColor( hdcMetafile, 0 );
916
917 ret = SaveDC(hdcMetafile);
918 ok(ret == 1, "ret = %d\n", ret);
919
920 SetWindowOrgEx(hdcMetafile, -3, -3, NULL);
921 SetViewportOrgEx(hdcMetafile, 30, 30, NULL);
922 SetWindowExtEx(hdcMetafile, 200, 200, NULL );
923 SetViewportExtEx(hdcMetafile, 400, 400, NULL );
924
925 SetPolyFillMode( hdcMetafile, WINDING );
926 SetBkColor( hdcMetafile, 0x123456 );
927 ok( !GetPolyFillMode( hdcMetafile ), "GetPolyFillMode succeeded\n" );
928 ok( GetBkColor( hdcMetafile ) == CLR_INVALID, "GetBkColor succeeded\n" );
929
930 /* Force Win9x to update DC state */
931 SetPixelV(hdcMetafile, 50, 50, 0);
932
933 ret = RestoreDC(hdcMetafile, -1);
934 ok(ret, "ret = %d\n", ret);
935
936 ret = SaveDC(hdcMetafile);
937 ok(ret == 1, "ret = %d\n", ret);
938
939 ret = RestoreDC(hdcMetafile, 1);
940 ok(ret, "ret = %d\n", ret);
941
942 SetWindowOrgEx(hdcMetafile, -4, -4, NULL);
943 SetViewportOrgEx(hdcMetafile, 40, 40, NULL);
944 SetWindowExtEx(hdcMetafile, 500, 500, NULL );
945 SetViewportExtEx(hdcMetafile, 50, 50, NULL );
946
947 /* Force Win9x to update DC state */
948 SetPixelV(hdcMetafile, 50, 50, 0);
949
950 ret = SaveDC(hdcMetafile);
951 ok(ret == 1, "ret = %d\n", ret);
952
953 ret = SaveDC(hdcMetafile);
954 ok(ret == 1, "ret = %d\n", ret);
955
956 memset(&orig_lf, 0, sizeof(orig_lf));
960 orig_lf.lfHeight = 7;
962 lstrcpyA(orig_lf.lfFaceName, "Arial");
964 ok(hFont != 0, "CreateFontIndirectA error %ld\n", GetLastError());
965
966 hFontOld = SelectObject(hdcMetafile, hFont);
967
968 hFont2 = CreateFontIndirectA(&orig_lf);
969 ok(hFont2 != 0, "CreateFontIndirectA error %ld\n", GetLastError());
970 hFontCheck = SelectObject(hdcMetafile, hFont2);
971 ok(hFontCheck == hFont, "Font not selected\n");
972
973 /* Force Win9x to update DC state */
974 SetPixelV(hdcMetafile, 50, 50, 0);
975
976 ret = RestoreDC(hdcMetafile, 1);
977 ok(ret, "ret = %d\n", ret);
978
979 hFontCheck = SelectObject(hdcMetafile, hFontOld);
980 ok(hFontOld != hFontCheck && hFontCheck == hFont2, "Font incorrectly reverted with DC Restore\n");
981
982 /* restore level is ignored */
983 ret = RestoreDC(hdcMetafile, -20);
984 ok(ret, "ret = %d\n", ret);
985 ret = RestoreDC(hdcMetafile, 20);
986 ok(ret, "ret = %d\n", ret);
987 ret = RestoreDC(hdcMetafile, 0);
988 ok(ret, "ret = %d\n", ret);
989
990 hMetafile = CloseMetaFile(hdcMetafile);
991 ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError());
992
993 ret = DeleteMetaFile(hMetafile);
994 ok( ret, "DeleteMetaFile error %ld\n", GetLastError());
996 ok( ret, "DeleteObject error %ld\n", GetLastError());
997 ret = DeleteObject(hFont2);
998 ok( ret, "DeleteObject error %ld\n", GetLastError());
999}
1000
1001
1002/* Win-format metafile (mfdrv) tests */
1003/* These tests compare the generated metafiles byte-by-byte */
1004/* with the nominal results. */
1005
1006/* Maximum size of sample metafiles in bytes. */
1007#define MF_BUFSIZE 2048
1008
1009/* 8x8 bitmap data for a pattern brush */
1010static const unsigned char SAMPLE_PATTERN_BRUSH[] = {
1011 0x01, 0x00, 0x02, 0x00,
1012 0x03, 0x00, 0x04, 0x00,
1013 0x05, 0x00, 0x06, 0x00,
1014 0x07, 0x00, 0x08, 0x00
1015};
1016
1017/* Sample metafiles to be compared to the outputs of the
1018 * test functions.
1019 */
1020
1021static const unsigned char MF_BLANK_BITS[] = {
1022 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x0c, 0x00,
1023 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1024 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
1025};
1026
1027static const unsigned char MF_GRAPHICS_BITS[] = {
1028 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x22, 0x00,
1029 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1030 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x02,
1031 0x01, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00,
1032 0x13, 0x02, 0x02, 0x00, 0x02, 0x00, 0x05, 0x00,
1033 0x00, 0x00, 0x14, 0x02, 0x01, 0x00, 0x01, 0x00,
1034 0x07, 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x00,
1035 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
1036 0x00, 0x00, 0x00, 0x00
1037};
1038
1039static const unsigned char MF_PATTERN_BRUSH_BITS[] = {
1040 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x9e, 0x00,
1041 0x00, 0x00, 0x02, 0x00, 0x5d, 0x00, 0x00, 0x00,
1042 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x42, 0x01,
1043 0x03, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1044 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1045 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1046 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1049 0xff, 0xff, 0xff, 0x00, 0x08, 0x00, 0x00, 0x00,
1050 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1051 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1052 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1053 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1054 0x2d, 0x01, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00,
1055 0x42, 0x01, 0x05, 0x00, 0x00, 0x00, 0x28, 0x00,
1056 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00,
1057 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
1058 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
1059 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1060 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1061 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00,
1062 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00,
1063 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00,
1064 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00,
1065 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00,
1066 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00,
1067 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0e, 0x00,
1068 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x10, 0x00,
1069 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00,
1070 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x14, 0x00,
1071 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00,
1072 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x18, 0x00,
1073 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00,
1074 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x1c, 0x00,
1075 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x00,
1076 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x20, 0x00,
1077 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00,
1078 0x00, 0x00, 0x2d, 0x01, 0x01, 0x00, 0x03, 0x00,
1079 0x00, 0x00, 0x00, 0x00
1080};
1081
1082static const unsigned char MF_DCBRUSH_BITS[] =
1083{
1084 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x2a, 0x00,
1085 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00,
1086 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x02,
1087 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
1088 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01, 0x00, 0x00,
1089 0x08, 0x00, 0x00, 0x00, 0xfa, 0x02, 0x00, 0x00,
1090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1091 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01, 0x01, 0x00,
1092 0x07, 0x00, 0x00, 0x00, 0x1b, 0x04, 0x14, 0x00,
1093 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x03, 0x00,
1094 0x00, 0x00, 0x00, 0x00
1095};
1096
1097static const unsigned char MF_TEXTOUT_ON_PATH_BITS[] =
1098{
1099 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x19, 0x00,
1100 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
1101 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x0a,
1102 0x16, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x00,
1103 0x54, 0x65, 0x73, 0x74, 0x03, 0x00, 0x05, 0x00,
1104 0x08, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00,
1105 0x00, 0x00
1106};
1107
1108static const unsigned char EMF_TEXTOUT_ON_PATH_BITS[] =
1109{
1110 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1112 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1114 0xe7, 0xff, 0xff, 0xff, 0xe9, 0xff, 0xff, 0xff,
1115 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1116 0xf4, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1117 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1118 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1119 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1120 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
1121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1122 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00,
1123 0x80, 0xa9, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00,
1124 0x08, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
1125 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1126 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
1127 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
1128 0x00, 0x00, 0xc8, 0x41, 0x00, 0x80, 0xbb, 0x41,
1129 0x0b, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
1130 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
1131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1132 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
1133 0xff, 0xff, 0xff, 0xff, 0x54, 0x00, 0x00, 0x00,
1134 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
1135 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1136 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1137 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1138 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1139 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1140 0x14, 0x00, 0x00, 0x00
1141};
1142
1143static const unsigned char EMF_TEXTOUT_OUTLINE_ON_PATH_BITS[] =
1144{
1145 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1147 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1148 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1149 0xdd, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff,
1150 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1151 0x0c, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1152 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1154 0x90, 0x06, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00,
1155 0x51, 0x02, 0x00, 0x00, 0x72, 0x01, 0x00, 0x00,
1156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1157 0x00, 0x00, 0x00, 0x00, 0x1a, 0x0b, 0x09, 0x00,
1158 0xf0, 0xa6, 0x05, 0x00, 0x25, 0x00, 0x00, 0x00,
1159 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x80,
1160 0x3b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1161 0x54, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
1162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1163 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1164 0x01, 0x00, 0x00, 0x00, 0xc3, 0x30, 0x0d, 0x42,
1165 0xcf, 0xf3, 0x0c, 0x42, 0x0b, 0x00, 0x00, 0x00,
1166 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1167 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1169 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1170 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00,
1171 0x73, 0x00, 0x74, 0x00, 0x03, 0x00, 0x00, 0x00,
1172 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1173 0x0c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
1174 0x08, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
1175 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x80,
1176 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1177 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1178 0x14, 0x00, 0x00, 0x00
1179};
1180
1181static const unsigned char MF_LINETO_BITS[] = {
1182 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00,
1183 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1184 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02,
1185 0x0f, 0x00, 0x37, 0x00, 0x03, 0x00, 0x00, 0x00,
1186 0x00, 0x00
1187};
1188
1189static const unsigned char EMF_LINETO_BITS[] = {
1190 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1191 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1192 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1194 0x61, 0x06, 0x00, 0x00, 0xb7, 0x01, 0x00, 0x00,
1195 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1196 0x38, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
1197 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1199 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1200 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00,
1201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1202 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00,
1203 0xe0, 0x93, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00,
1204 0x48, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00,
1205 0x47, 0x44, 0x49, 0x43, 0x01, 0x00, 0x00, 0x80,
1206 0x00, 0x03, 0x00, 0x00, 0x60, 0xe5, 0xf4, 0x73,
1207 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
1208 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00,
1209 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1210 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02,
1211 0x0f, 0x00, 0x37, 0x00, 0x03, 0x00, 0x00, 0x00,
1212 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
1213 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1214 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1215 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1216 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1217 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1218 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1219 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1220 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1221 0x07, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x00,
1222 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1223 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1224 0x0f, 0x00, 0x00, 0x80, 0x4b, 0x00, 0x00, 0x00,
1225 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1226 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
1227 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1228 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
1229};
1230
1231static const unsigned char EMF_LINETO_MM_ANISOTROPIC_BITS[] = {
1232 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1234 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1236 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
1237 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1238 0x38, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
1239 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1241 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1242 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00,
1243 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1244 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00,
1245 0xe0, 0x93, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00,
1246 0x48, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00,
1247 0x47, 0x44, 0x49, 0x43, 0x01, 0x00, 0x00, 0x80,
1248 0x00, 0x03, 0x00, 0x00, 0xa4, 0xfe, 0xf4, 0x73,
1249 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
1250 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00,
1251 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1252 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02,
1253 0x0f, 0x00, 0x37, 0x00, 0x03, 0x00, 0x00, 0x00,
1254 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
1255 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1256 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1257 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1258 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1259 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1260 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1261 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1262 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1263 0x07, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x00,
1264 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1265 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1266 0x0f, 0x00, 0x00, 0x80, 0x4b, 0x00, 0x00, 0x00,
1267 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1268 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
1269 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1270 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
1271};
1272
1273static const unsigned char EMF_LINETO_MM_TEXT_BITS[] = {
1274 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1276 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1277 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1278 0x61, 0x06, 0x00, 0x00, 0xb7, 0x01, 0x00, 0x00,
1279 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1280 0xe4, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
1281 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1282 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1283 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1284 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00,
1285 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1286 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00,
1287 0xe0, 0x93, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00,
1288 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
1289 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
1290 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
1291 0x00, 0x04, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
1292 0x10, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00,
1293 0x0f, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
1294 0x0c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80,
1295 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1296 0x00, 0x00, 0x00, 0x80, 0x30, 0x00, 0x00, 0x00,
1297 0x0c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x80,
1298 0x4b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1299 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1300 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1301 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1302 0x14, 0x00, 0x00, 0x00
1303};
1304
1305static const unsigned char EMF_DCBRUSH_BITS[] =
1306{
1307 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1308 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1309 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
1310 0x39, 0x01, 0x00, 0x00, 0x39, 0x01, 0x00, 0x00,
1311 0x52, 0x02, 0x00, 0x00, 0x52, 0x02, 0x00, 0x00,
1312 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1313 0x44, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
1314 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1315 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1316 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
1317 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
1318 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1319 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00,
1320 0x80, 0xa9, 0x03, 0x00, 0x25, 0x00, 0x00, 0x00,
1321 0x0c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x80,
1322 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1323 0x13, 0x00, 0x00, 0x80, 0x27, 0x00, 0x00, 0x00,
1324 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1325 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x00,
1326 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
1327 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1328 0x26, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
1329 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1331 0x33, 0x44, 0x55, 0x00, 0x25, 0x00, 0x00, 0x00,
1332 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1333 0x2b, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
1334 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1335 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
1336 0x28, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1337 0x01, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
1338 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1339 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x56, 0x00,
1340 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
1341 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1342 0x28, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1343 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1344 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1345 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1346 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1347 0x14, 0x00, 0x00, 0x00
1348};
1349
1350static const unsigned char EMF_BEZIER_BITS[] =
1351{
1352 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1354 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
1355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1356 0x1a, 0x2a, 0x0d, 0x00, 0x1a, 0x2f, 0x0d, 0x00,
1357 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1358 0x44, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1359 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1361 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
1362 0x51, 0x01, 0x00, 0x00, 0x0e, 0x01, 0x00, 0x00,
1363 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1364 0x00, 0x00, 0x00, 0x00, 0x68, 0x24, 0x05, 0x00,
1365 0xb0, 0x1e, 0x04, 0x00, 0x58, 0x00, 0x00, 0x00,
1366 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1367 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1368 0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1369 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00,
1370 0x0f, 0x00, 0x0f, 0x00, 0x55, 0x00, 0x00, 0x00,
1371 0x2c, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1372 0x0a, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
1373 0x19, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1374 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00,
1375 0x0f, 0x00, 0x0f, 0x00, 0x19, 0x00, 0x19, 0x00,
1376 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
1377 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1378 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
1379 0x04, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
1380 0x01, 0x80, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1381 0x14, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1382 0x0f, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
1383 0x19, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1384 0x34, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1385 0x0f, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
1386 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1387 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
1388 0x14, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1389 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1390 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1391 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1392 0x14, 0x00, 0x00, 0x00
1393};
1394
1395static const unsigned char EMF_POLYPOLYLINE_BITS[] =
1396{
1397 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1398 0x0a, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1399 0x00, 0x90, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00,
1400 0x61, 0x01, 0x00, 0x00, 0xc2, 0x02, 0x00, 0x00,
1401 0x7a, 0xd4, 0x13, 0x00, 0xe8, 0x44, 0x00, 0x00,
1402 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1403 0x84, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1404 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1406 0xa1, 0x05, 0x00, 0x00, 0x47, 0x03, 0x00, 0x00,
1407 0xfc, 0x01, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00,
1408 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1409 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc1, 0x07, 0x00,
1410 0x2c, 0x84, 0x04, 0x00, 0x5a, 0x00, 0x00, 0x00,
1411 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1412 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
1413 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
1414 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00,
1415 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1416 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
1417 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00,
1418 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1419 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00,
1420 0x5a, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
1421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1422 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1423 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1424 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1425 0x0a, 0x00, 0x14, 0x00, 0x64, 0x00, 0xc8, 0x00,
1426 0x07, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
1427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1428 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1429 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1430 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1431 0x0a, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1432 0x64, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00,
1433 0x00, 0x90, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00,
1434 0x07, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
1435 0x0a, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1436 0x00, 0x90, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00,
1437 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1438 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1439 0x0a, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1440 0x64, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00,
1441 0x00, 0x90, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00,
1442 0x90, 0x01, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00,
1443 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1444 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1445 0x14, 0x00, 0x00, 0x00
1446};
1447
1448static const unsigned char EMF_GRADIENTFILL_BITS[] =
1449{
1450 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1451 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1452 0x2b, 0x01, 0x00, 0x00, 0x35, 0x01, 0x00, 0x00,
1453 0x23, 0x00, 0x00, 0x00, 0x61, 0x01, 0x00, 0x00,
1454 0x31, 0x29, 0x00, 0x00, 0xa3, 0x2a, 0x00, 0x00,
1455 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1456 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1457 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1458 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1459 0x40, 0x05, 0x00, 0x00, 0x46, 0x03, 0x00, 0x00,
1460 0xda, 0x01, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00,
1461 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1462 0x00, 0x00, 0x00, 0x00, 0x15, 0x3c, 0x07, 0x00,
1463 0xcb, 0x82, 0x04, 0x00, 0x76, 0x00, 0x00, 0x00,
1464 0x8c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1465 0x0a, 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00,
1466 0x35, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1467 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1468 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1469 0x00, 0xff, 0x00, 0x80, 0x00, 0x00, 0x01, 0x80,
1470 0xc8, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00, 0x00,
1471 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
1472 0xb4, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00,
1473 0x34, 0x12, 0x78, 0x56, 0xbc, 0x9a, 0xf0, 0xde,
1474 0x2c, 0x01, 0x00, 0x00, 0x36, 0x01, 0x00, 0x00,
1475 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00,
1476 0x90, 0x01, 0x00, 0x00, 0x9a, 0x01, 0x00, 0x00,
1477 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00,
1478 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1479 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1480 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1481 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1482 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
1483 0x14, 0x00, 0x00, 0x00
1484};
1485
1486static const unsigned char emf_pattern_brush_bits[] =
1487{
1488 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1489 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1490 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1491 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1492 0xe6, 0xff, 0xff, 0xff, 0xe5, 0xff, 0xff, 0xff,
1493 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1494 0xd8, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1495 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1496 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1497 0x77, 0x07, 0x00, 0x00, 0x3b, 0x04, 0x00, 0x00,
1498 0xfa, 0x01, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00,
1499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1500 0x00, 0x00, 0x00, 0x00, 0x12, 0xb7, 0x07, 0x00,
1501 0x4f, 0x5f, 0x04, 0x00, 0x5d, 0x00, 0x00, 0x00,
1502 0x6c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1503 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1504 0x28, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
1505 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
1506 0x28, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1507 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
1508 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
1509 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1510 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1511 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1512 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1513 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1514 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1515 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1516 0x01, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
1517 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1518 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1519 0x30, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
1520 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
1521 0x28, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
1522 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
1523 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
1524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1525 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1526 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1527 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1528 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1529 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1530 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
1531 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
1532 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
1533 0x0e, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1534 0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
1535 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
1536 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
1537 0x16, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
1538 0x18, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
1539 0x1a, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
1540 0x1c, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00,
1541 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
1542 0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
1543 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1544 0x02, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
1545 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1546 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
1547};
1548
1549static const unsigned char mf_palette_brush_bits[] =
1550{
1551 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0xb2, 0x03,
1552 0x00, 0x00, 0x02, 0x00, 0x05, 0x02, 0x00, 0x00,
1553 0x00, 0x00, 0x05, 0x02, 0x00, 0x00, 0xf7, 0x00,
1554 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1555 0x02, 0x02, 0x02, 0x00, 0x04, 0x04, 0x04, 0x00,
1556 0x06, 0x06, 0x06, 0x00, 0x08, 0x08, 0x08, 0x00,
1557 0x0a, 0x0a, 0x0a, 0x00, 0x0c, 0x0c, 0x0c, 0x00,
1558 0x0e, 0x0e, 0x0e, 0x00, 0x10, 0x10, 0x10, 0x00,
1559 0x12, 0x12, 0x12, 0x00, 0x14, 0x14, 0x14, 0x00,
1560 0x16, 0x16, 0x16, 0x00, 0x18, 0x18, 0x18, 0x00,
1561 0x1a, 0x1a, 0x1a, 0x00, 0x1c, 0x1c, 0x1c, 0x00,
1562 0x1e, 0x1e, 0x1e, 0x00, 0x20, 0x20, 0x20, 0x00,
1563 0x22, 0x22, 0x22, 0x00, 0x24, 0x24, 0x24, 0x00,
1564 0x26, 0x26, 0x26, 0x00, 0x28, 0x28, 0x28, 0x00,
1565 0x2a, 0x2a, 0x2a, 0x00, 0x2c, 0x2c, 0x2c, 0x00,
1566 0x2e, 0x2e, 0x2e, 0x00, 0x30, 0x30, 0x30, 0x00,
1567 0x32, 0x32, 0x32, 0x00, 0x34, 0x34, 0x34, 0x00,
1568 0x36, 0x36, 0x36, 0x00, 0x38, 0x38, 0x38, 0x00,
1569 0x3a, 0x3a, 0x3a, 0x00, 0x3c, 0x3c, 0x3c, 0x00,
1570 0x3e, 0x3e, 0x3e, 0x00, 0x40, 0x40, 0x40, 0x00,
1571 0x42, 0x42, 0x42, 0x00, 0x44, 0x44, 0x44, 0x00,
1572 0x46, 0x46, 0x46, 0x00, 0x48, 0x48, 0x48, 0x00,
1573 0x4a, 0x4a, 0x4a, 0x00, 0x4c, 0x4c, 0x4c, 0x00,
1574 0x4e, 0x4e, 0x4e, 0x00, 0x50, 0x50, 0x50, 0x00,
1575 0x52, 0x52, 0x52, 0x00, 0x54, 0x54, 0x54, 0x00,
1576 0x56, 0x56, 0x56, 0x00, 0x58, 0x58, 0x58, 0x00,
1577 0x5a, 0x5a, 0x5a, 0x00, 0x5c, 0x5c, 0x5c, 0x00,
1578 0x5e, 0x5e, 0x5e, 0x00, 0x60, 0x60, 0x60, 0x00,
1579 0x62, 0x62, 0x62, 0x00, 0x64, 0x64, 0x64, 0x00,
1580 0x66, 0x66, 0x66, 0x00, 0x68, 0x68, 0x68, 0x00,
1581 0x6a, 0x6a, 0x6a, 0x00, 0x6c, 0x6c, 0x6c, 0x00,
1582 0x6e, 0x6e, 0x6e, 0x00, 0x70, 0x70, 0x70, 0x00,
1583 0x72, 0x72, 0x72, 0x00, 0x74, 0x74, 0x74, 0x00,
1584 0x76, 0x76, 0x76, 0x00, 0x78, 0x78, 0x78, 0x00,
1585 0x7a, 0x7a, 0x7a, 0x00, 0x7c, 0x7c, 0x7c, 0x00,
1586 0x7e, 0x7e, 0x7e, 0x00, 0x80, 0x80, 0x80, 0x00,
1587 0x82, 0x82, 0x82, 0x00, 0x84, 0x84, 0x84, 0x00,
1588 0x86, 0x86, 0x86, 0x00, 0x88, 0x88, 0x88, 0x00,
1589 0x8a, 0x8a, 0x8a, 0x00, 0x8c, 0x8c, 0x8c, 0x00,
1590 0x8e, 0x8e, 0x8e, 0x00, 0x90, 0x90, 0x90, 0x00,
1591 0x92, 0x92, 0x92, 0x00, 0x94, 0x94, 0x94, 0x00,
1592 0x96, 0x96, 0x96, 0x00, 0x98, 0x98, 0x98, 0x00,
1593 0x9a, 0x9a, 0x9a, 0x00, 0x9c, 0x9c, 0x9c, 0x00,
1594 0x9e, 0x9e, 0x9e, 0x00, 0xa0, 0xa0, 0xa0, 0x00,
1595 0xa2, 0xa2, 0xa2, 0x00, 0xa4, 0xa4, 0xa4, 0x00,
1596 0xa6, 0xa6, 0xa6, 0x00, 0xa8, 0xa8, 0xa8, 0x00,
1597 0xaa, 0xaa, 0xaa, 0x00, 0xac, 0xac, 0xac, 0x00,
1598 0xae, 0xae, 0xae, 0x00, 0xb0, 0xb0, 0xb0, 0x00,
1599 0xb2, 0xb2, 0xb2, 0x00, 0xb4, 0xb4, 0xb4, 0x00,
1600 0xb6, 0xb6, 0xb6, 0x00, 0xb8, 0xb8, 0xb8, 0x00,
1601 0xba, 0xba, 0xba, 0x00, 0xbc, 0xbc, 0xbc, 0x00,
1602 0xbe, 0xbe, 0xbe, 0x00, 0xc0, 0xc0, 0xc0, 0x00,
1603 0xc2, 0xc2, 0xc2, 0x00, 0xc4, 0xc4, 0xc4, 0x00,
1604 0xc6, 0xc6, 0xc6, 0x00, 0xc8, 0xc8, 0xc8, 0x00,
1605 0xca, 0xca, 0xca, 0x00, 0xcc, 0xcc, 0xcc, 0x00,
1606 0xce, 0xce, 0xce, 0x00, 0xd0, 0xd0, 0xd0, 0x00,
1607 0xd2, 0xd2, 0xd2, 0x00, 0xd4, 0xd4, 0xd4, 0x00,
1608 0xd6, 0xd6, 0xd6, 0x00, 0xd8, 0xd8, 0xd8, 0x00,
1609 0xda, 0xda, 0xda, 0x00, 0xdc, 0xdc, 0xdc, 0x00,
1610 0xde, 0xde, 0xde, 0x00, 0xe0, 0xe0, 0xe0, 0x00,
1611 0xe2, 0xe2, 0xe2, 0x00, 0xe4, 0xe4, 0xe4, 0x00,
1612 0xe6, 0xe6, 0xe6, 0x00, 0xe8, 0xe8, 0xe8, 0x00,
1613 0xea, 0xea, 0xea, 0x00, 0xec, 0xec, 0xec, 0x00,
1614 0xee, 0xee, 0xee, 0x00, 0xf0, 0xf0, 0xf0, 0x00,
1615 0xf2, 0xf2, 0xf2, 0x00, 0xf4, 0xf4, 0xf4, 0x00,
1616 0xf6, 0xf6, 0xf6, 0x00, 0xf8, 0xf8, 0xf8, 0x00,
1617 0xfa, 0xfa, 0xfa, 0x00, 0xfc, 0xfc, 0xfc, 0x00,
1618 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
1619 0x02, 0x02, 0x02, 0x00, 0x04, 0x04, 0x04, 0x00,
1620 0x06, 0x06, 0x06, 0x00, 0x08, 0x08, 0x08, 0x00,
1621 0x0a, 0x0a, 0x0a, 0x00, 0x0c, 0x0c, 0x0c, 0x00,
1622 0x0e, 0x0e, 0x0e, 0x00, 0x10, 0x10, 0x10, 0x00,
1623 0x12, 0x12, 0x12, 0x00, 0x14, 0x14, 0x14, 0x00,
1624 0x16, 0x16, 0x16, 0x00, 0x18, 0x18, 0x18, 0x00,
1625 0x1a, 0x1a, 0x1a, 0x00, 0x1c, 0x1c, 0x1c, 0x00,
1626 0x1e, 0x1e, 0x1e, 0x00, 0x20, 0x20, 0x20, 0x00,
1627 0x22, 0x22, 0x22, 0x00, 0x24, 0x24, 0x24, 0x00,
1628 0x26, 0x26, 0x26, 0x00, 0x28, 0x28, 0x28, 0x00,
1629 0x2a, 0x2a, 0x2a, 0x00, 0x2c, 0x2c, 0x2c, 0x00,
1630 0x2e, 0x2e, 0x2e, 0x00, 0x30, 0x30, 0x30, 0x00,
1631 0x32, 0x32, 0x32, 0x00, 0x34, 0x34, 0x34, 0x00,
1632 0x36, 0x36, 0x36, 0x00, 0x38, 0x38, 0x38, 0x00,
1633 0x3a, 0x3a, 0x3a, 0x00, 0x3c, 0x3c, 0x3c, 0x00,
1634 0x3e, 0x3e, 0x3e, 0x00, 0x40, 0x40, 0x40, 0x00,
1635 0x42, 0x42, 0x42, 0x00, 0x44, 0x44, 0x44, 0x00,
1636 0x46, 0x46, 0x46, 0x00, 0x48, 0x48, 0x48, 0x00,
1637 0x4a, 0x4a, 0x4a, 0x00, 0x4c, 0x4c, 0x4c, 0x00,
1638 0x4e, 0x4e, 0x4e, 0x00, 0x50, 0x50, 0x50, 0x00,
1639 0x52, 0x52, 0x52, 0x00, 0x54, 0x54, 0x54, 0x00,
1640 0x56, 0x56, 0x56, 0x00, 0x58, 0x58, 0x58, 0x00,
1641 0x5a, 0x5a, 0x5a, 0x00, 0x5c, 0x5c, 0x5c, 0x00,
1642 0x5e, 0x5e, 0x5e, 0x00, 0x60, 0x60, 0x60, 0x00,
1643 0x62, 0x62, 0x62, 0x00, 0x64, 0x64, 0x64, 0x00,
1644 0x66, 0x66, 0x66, 0x00, 0x68, 0x68, 0x68, 0x00,
1645 0x6a, 0x6a, 0x6a, 0x00, 0x6c, 0x6c, 0x6c, 0x00,
1646 0x6e, 0x6e, 0x6e, 0x00, 0x70, 0x70, 0x70, 0x00,
1647 0x72, 0x72, 0x72, 0x00, 0x74, 0x74, 0x74, 0x00,
1648 0x76, 0x76, 0x76, 0x00, 0x78, 0x78, 0x78, 0x00,
1649 0x7a, 0x7a, 0x7a, 0x00, 0x7c, 0x7c, 0x7c, 0x00,
1650 0x7e, 0x7e, 0x7e, 0x00, 0x80, 0x80, 0x80, 0x00,
1651 0x82, 0x82, 0x82, 0x00, 0x84, 0x84, 0x84, 0x00,
1652 0x86, 0x86, 0x86, 0x00, 0x88, 0x88, 0x88, 0x00,
1653 0x8a, 0x8a, 0x8a, 0x00, 0x8c, 0x8c, 0x8c, 0x00,
1654 0x8e, 0x8e, 0x8e, 0x00, 0x90, 0x90, 0x90, 0x00,
1655 0x92, 0x92, 0x92, 0x00, 0x94, 0x94, 0x94, 0x00,
1656 0x96, 0x96, 0x96, 0x00, 0x98, 0x98, 0x98, 0x00,
1657 0x9a, 0x9a, 0x9a, 0x00, 0x9c, 0x9c, 0x9c, 0x00,
1658 0x9e, 0x9e, 0x9e, 0x00, 0xa0, 0xa0, 0xa0, 0x00,
1659 0xa2, 0xa2, 0xa2, 0x00, 0xa4, 0xa4, 0xa4, 0x00,
1660 0xa6, 0xa6, 0xa6, 0x00, 0xa8, 0xa8, 0xa8, 0x00,
1661 0xaa, 0xaa, 0xaa, 0x00, 0xac, 0xac, 0xac, 0x00,
1662 0xae, 0xae, 0xae, 0x00, 0xb0, 0xb0, 0xb0, 0x00,
1663 0xb2, 0xb2, 0xb2, 0x00, 0xb4, 0xb4, 0xb4, 0x00,
1664 0xb6, 0xb6, 0xb6, 0x00, 0xb8, 0xb8, 0xb8, 0x00,
1665 0xba, 0xba, 0xba, 0x00, 0xbc, 0xbc, 0xbc, 0x00,
1666 0xbe, 0xbe, 0xbe, 0x00, 0xc0, 0xc0, 0xc0, 0x00,
1667 0xc2, 0xc2, 0xc2, 0x00, 0xc4, 0xc4, 0xc4, 0x00,
1668 0xc6, 0xc6, 0xc6, 0x00, 0xc8, 0xc8, 0xc8, 0x00,
1669 0xca, 0xca, 0xca, 0x00, 0xcc, 0xcc, 0xcc, 0x00,
1670 0xce, 0xce, 0xce, 0x00, 0xd0, 0xd0, 0xd0, 0x00,
1671 0xd2, 0xd2, 0xd2, 0x00, 0xd4, 0xd4, 0xd4, 0x00,
1672 0xd6, 0xd6, 0xd6, 0x00, 0xd8, 0xd8, 0xd8, 0x00,
1673 0xda, 0xda, 0xda, 0x00, 0xdc, 0xdc, 0xdc, 0x00,
1674 0xde, 0xde, 0xde, 0x00, 0xe0, 0xe0, 0xe0, 0x00,
1675 0xe2, 0xe2, 0xe2, 0x00, 0xe4, 0xe4, 0xe4, 0x00,
1676 0xe6, 0xe6, 0xe6, 0x00, 0xe8, 0xe8, 0xe8, 0x00,
1677 0xea, 0xea, 0xea, 0x00, 0xec, 0xec, 0xec, 0x00,
1678 0xee, 0xee, 0xee, 0x00, 0xf0, 0xf0, 0xf0, 0x00,
1679 0xf2, 0xf2, 0xf2, 0x00, 0xf4, 0xf4, 0xf4, 0x00,
1680 0xf6, 0xf6, 0xf6, 0x00, 0xf8, 0xf8, 0xf8, 0x00,
1681 0xfa, 0xfa, 0xfa, 0x00, 0xfc, 0xfc, 0xfc, 0x00,
1682 0xfe, 0xfe, 0xfe, 0x00, 0x04, 0x00, 0x00, 0x00,
1683 0x34, 0x02, 0x00, 0x00, 0x99, 0x01, 0x00, 0x00,
1684 0x42, 0x01, 0x05, 0x00, 0x01, 0x00, 0x28, 0x00,
1685 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
1686 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
1687 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1688 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1689 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
1690 0xfe, 0x00, 0xfd, 0x00, 0xfc, 0x00, 0xfb, 0x00,
1691 0xfa, 0x00, 0xf9, 0x00, 0xf8, 0x00, 0xf7, 0x00,
1692 0xf6, 0x00, 0xf5, 0x00, 0xf4, 0x00, 0xf3, 0x00,
1693 0xf2, 0x00, 0xf1, 0x00, 0xf0, 0x00, 0xef, 0x00,
1694 0xee, 0x00, 0xed, 0x00, 0xec, 0x00, 0xeb, 0x00,
1695 0xea, 0x00, 0xe9, 0x00, 0xe8, 0x00, 0xe7, 0x00,
1696 0xe6, 0x00, 0xe5, 0x00, 0xe4, 0x00, 0xe3, 0x00,
1697 0xe2, 0x00, 0xe1, 0x00, 0xe0, 0x00, 0xdf, 0x00,
1698 0xde, 0x00, 0xdd, 0x00, 0xdc, 0x00, 0xdb, 0x00,
1699 0xda, 0x00, 0xd9, 0x00, 0xd8, 0x00, 0xd7, 0x00,
1700 0xd6, 0x00, 0xd5, 0x00, 0xd4, 0x00, 0xd3, 0x00,
1701 0xd2, 0x00, 0xd1, 0x00, 0xd0, 0x00, 0xcf, 0x00,
1702 0xce, 0x00, 0xcd, 0x00, 0xcc, 0x00, 0xcb, 0x00,
1703 0xca, 0x00, 0xc9, 0x00, 0xc8, 0x00, 0xc7, 0x00,
1704 0xc6, 0x00, 0xc5, 0x00, 0xc4, 0x00, 0xc3, 0x00,
1705 0xc2, 0x00, 0xc1, 0x00, 0xc0, 0x00, 0xbf, 0x00,
1706 0xbe, 0x00, 0xbd, 0x00, 0xbc, 0x00, 0xbb, 0x00,
1707 0xba, 0x00, 0xb9, 0x00, 0xb8, 0x00, 0xb7, 0x00,
1708 0xb6, 0x00, 0xb5, 0x00, 0xb4, 0x00, 0xb3, 0x00,
1709 0xb2, 0x00, 0xb1, 0x00, 0xb0, 0x00, 0xaf, 0x00,
1710 0xae, 0x00, 0xad, 0x00, 0xac, 0x00, 0xab, 0x00,
1711 0xaa, 0x00, 0xa9, 0x00, 0xa8, 0x00, 0xa7, 0x00,
1712 0xa6, 0x00, 0xa5, 0x00, 0xa4, 0x00, 0xa3, 0x00,
1713 0xa2, 0x00, 0xa1, 0x00, 0xa0, 0x00, 0x9f, 0x00,
1714 0x9e, 0x00, 0x9d, 0x00, 0x9c, 0x00, 0x9b, 0x00,
1715 0x9a, 0x00, 0x99, 0x00, 0x98, 0x00, 0x97, 0x00,
1716 0x96, 0x00, 0x95, 0x00, 0x94, 0x00, 0x93, 0x00,
1717 0x92, 0x00, 0x91, 0x00, 0x90, 0x00, 0x8f, 0x00,
1718 0x8e, 0x00, 0x8d, 0x00, 0x8c, 0x00, 0x8b, 0x00,
1719 0x8a, 0x00, 0x89, 0x00, 0x88, 0x00, 0x87, 0x00,
1720 0x86, 0x00, 0x85, 0x00, 0x84, 0x00, 0x83, 0x00,
1721 0x82, 0x00, 0x81, 0x00, 0x80, 0x00, 0x7f, 0x00,
1722 0x7e, 0x00, 0x7d, 0x00, 0x7c, 0x00, 0x7b, 0x00,
1723 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x77, 0x00,
1724 0x76, 0x00, 0x75, 0x00, 0x74, 0x00, 0x73, 0x00,
1725 0x72, 0x00, 0x71, 0x00, 0x70, 0x00, 0x6f, 0x00,
1726 0x6e, 0x00, 0x6d, 0x00, 0x6c, 0x00, 0x6b, 0x00,
1727 0x6a, 0x00, 0x69, 0x00, 0x68, 0x00, 0x67, 0x00,
1728 0x66, 0x00, 0x65, 0x00, 0x64, 0x00, 0x63, 0x00,
1729 0x62, 0x00, 0x61, 0x00, 0x60, 0x00, 0x5f, 0x00,
1730 0x5e, 0x00, 0x5d, 0x00, 0x5c, 0x00, 0x5b, 0x00,
1731 0x5a, 0x00, 0x59, 0x00, 0x58, 0x00, 0x57, 0x00,
1732 0x56, 0x00, 0x55, 0x00, 0x54, 0x00, 0x53, 0x00,
1733 0x52, 0x00, 0x51, 0x00, 0x50, 0x00, 0x4f, 0x00,
1734 0x4e, 0x00, 0x4d, 0x00, 0x4c, 0x00, 0x4b, 0x00,
1735 0x4a, 0x00, 0x49, 0x00, 0x48, 0x00, 0x47, 0x00,
1736 0x46, 0x00, 0x45, 0x00, 0x44, 0x00, 0x43, 0x00,
1737 0x42, 0x00, 0x41, 0x00, 0x40, 0x00, 0x3f, 0x00,
1738 0x3e, 0x00, 0x3d, 0x00, 0x3c, 0x00, 0x3b, 0x00,
1739 0x3a, 0x00, 0x39, 0x00, 0x38, 0x00, 0x37, 0x00,
1740 0x36, 0x00, 0x35, 0x00, 0x34, 0x00, 0x33, 0x00,
1741 0x32, 0x00, 0x31, 0x00, 0x30, 0x00, 0x2f, 0x00,
1742 0x2e, 0x00, 0x2d, 0x00, 0x2c, 0x00, 0x2b, 0x00,
1743 0x2a, 0x00, 0x29, 0x00, 0x28, 0x00, 0x27, 0x00,
1744 0x26, 0x00, 0x25, 0x00, 0x24, 0x00, 0x23, 0x00,
1745 0x22, 0x00, 0x21, 0x00, 0x20, 0x00, 0x1f, 0x00,
1746 0x1e, 0x00, 0x1d, 0x00, 0x1c, 0x00, 0x1b, 0x00,
1747 0x1a, 0x00, 0x19, 0x00, 0x18, 0x00, 0x17, 0x00,
1748 0x16, 0x00, 0x15, 0x00, 0x14, 0x00, 0x13, 0x00,
1749 0x12, 0x00, 0x11, 0x00, 0x10, 0x00, 0x0f, 0x00,
1750 0x0e, 0x00, 0x0d, 0x00, 0x0c, 0x00, 0x0b, 0x00,
1751 0x0a, 0x00, 0x09, 0x00, 0x08, 0x00, 0x07, 0x00,
1752 0x06, 0x00, 0x05, 0x00, 0x04, 0x00, 0x03, 0x00,
1753 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
1754 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
1755 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
1756 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
1757 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21,
1758 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
1759 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31,
1760 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
1761 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41,
1762 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
1763 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
1764 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
1765 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61,
1766 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
1767 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
1768 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
1769 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81,
1770 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
1771 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91,
1772 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
1773 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1,
1774 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9,
1775 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1,
1776 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9,
1777 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1,
1778 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
1779 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1,
1780 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
1781 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1,
1782 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
1783 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1,
1784 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
1785 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x04, 0x00,
1786 0x00, 0x00, 0x2d, 0x01, 0x01, 0x00, 0x03, 0x00,
1787 0x00, 0x00, 0x00, 0x00
1788};
1789
1790static const unsigned char emf_blit_bits[] =
1791{
1792 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1793 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1794 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1795 0x1a, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
1796 0x84, 0x00, 0x00, 0x00, 0xba, 0x00, 0x00, 0x00,
1797 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1798 0x20, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1799 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1801 0x77, 0x07, 0x00, 0x00, 0x3b, 0x04, 0x00, 0x00,
1802 0xfa, 0x01, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00,
1803 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1804 0x00, 0x00, 0x00, 0x00, 0x12, 0xb7, 0x07, 0x00,
1805 0x4f, 0x5f, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00,
1806 0x64, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1807 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1808 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1809 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1810 0x05, 0x00, 0x00, 0x00, 0x21, 0x00, 0xf0, 0x00,
1811 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1812 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1813 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1814 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1815 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1816 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1817 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1818 0x4d, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00,
1819 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1820 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1821 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1822 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1823 0x20, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00,
1824 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1825 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1826 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1827 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
1828 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1829 0x28, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00,
1830 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1831 0x03, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1832 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1833 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
1834 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1835 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1836 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d,
1837 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
1838 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
1839 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
1840 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
1841 0x4c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
1842 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1843 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
1844 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1845 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1846 0x21, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
1847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1849 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1850 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1852 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1853 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00,
1854 0xb8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1855 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1856 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1857 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1858 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
1859 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1860 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1861 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1862 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1863 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
1864 0x6c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1865 0x94, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1866 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1867 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1868 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
1869 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1870 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1871 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1872 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
1873 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
1874 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21,
1875 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
1876 0x2a, 0x2b, 0x2c, 0x2d, 0x4c, 0x00, 0x00, 0x00,
1877 0xb0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1878 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1879 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1880 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1881 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
1882 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1883 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1884 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1885 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1886 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
1887 0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1888 0x8c, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1889 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1890 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
1891 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1892 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1893 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1894 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
1895 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
1896 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21,
1897 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
1898 0x2a, 0x2b, 0x2c, 0x2d, 0x74, 0x00, 0x00, 0x00,
1899 0xb8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1900 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1901 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1902 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1903 0x03, 0x00, 0x00, 0x00, 0x0a, 0x14, 0x1e, 0x00,
1904 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1905 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1906 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1907 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1908 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
1909 0x6c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1910 0x94, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1911 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1912 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1913 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
1914 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1915 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1916 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1917 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
1918 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
1919 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21,
1920 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
1921 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x00, 0x00, 0x00,
1922 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1923 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
1924};
1925
1926static const unsigned char emf_mask_blit_bits[] =
1927{
1928 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
1929 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1930 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1931 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1932 0x35, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
1933 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
1934 0x58, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1935 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1936 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1937 0x77, 0x07, 0x00, 0x00, 0x3b, 0x04, 0x00, 0x00,
1938 0xfa, 0x01, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00,
1939 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1940 0x00, 0x00, 0x00, 0x00, 0x12, 0xb7, 0x07, 0x00,
1941 0x4f, 0x5f, 0x04, 0x00, 0x4e, 0x00, 0x00, 0x00,
1942 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1943 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1944 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1945 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1946 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
1947 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1948 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1949 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1950 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1951 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
1952 0x80, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1953 0xa8, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1955 0x02, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00,
1956 0x28, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00,
1957 0x0c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1958 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1959 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
1960 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1961 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1962 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d,
1963 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
1964 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
1965 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
1966 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
1967 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1968 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
1969 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
1970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1972 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
1973 0xf0, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00,
1974 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1975 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1976 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1977 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1978 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
1979 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1980 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
1981 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
1982 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1983 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
1984 0x80, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1985 0xa8, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
1986 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1987 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1988 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1989 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
1990 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1991 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
1992 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1993 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1994 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d,
1995 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
1996 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
1997 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
1998 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
1999 0x4f, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00,
2000 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2001 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2002 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2003 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2004 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
2005 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2006 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2007 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
2008 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2009 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2010 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2011 0x8c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
2012 0xb4, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
2013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2014 0x02, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00,
2015 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
2016 0x0c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
2017 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2018 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
2019 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2020 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2021 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d,
2022 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
2023 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
2024 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
2025 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
2026 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2027 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
2028 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
2029 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2031 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
2032 0xf0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
2033 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2034 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
2035};
2036
2037/* For debugging or dumping the raw metafiles produced by
2038 * new test functions.
2039 */
2041 INT nobj, LPARAM param)
2042{
2043 trace("hdc %p, mr->rdFunction %04x, mr->rdSize %lu, param %p\n",
2044 hdc, mr->rdFunction, mr->rdSize, (void *)param);
2045 return TRUE;
2046}
2047
2048/* For debugging or dumping the raw metafiles produced by
2049 * new test functions.
2050 */
2051
2052static void dump_mf_bits (const HMETAFILE mf, const char *desc)
2053{
2055 UINT mfsize, i;
2056
2057 if (!winetest_debug) return;
2058
2059 mfsize = GetMetaFileBitsEx (mf, MF_BUFSIZE, buf);
2060 ok (mfsize > 0, "%s: GetMetaFileBitsEx failed.\n", desc);
2061
2062 printf ("MetaFile %s has bits:\n{\n ", desc);
2063 for (i=0; i<mfsize; i++)
2064 {
2065 printf ("0x%02x", buf[i]);
2066 if (i == mfsize-1)
2067 printf ("\n");
2068 else if (i % 8 == 7)
2069 printf (",\n ");
2070 else
2071 printf (", ");
2072 }
2073 printf ("};\n");
2074}
2075
2076/* Compare the metafile produced by a test function with the
2077 * expected raw metafile data in "bits".
2078 * Return value is 0 for a perfect match,
2079 * -1 if lengths aren't equal,
2080 * otherwise returns the number of non-matching bytes.
2081 */
2082
2083static int compare_mf_bits (const HMETAFILE mf, const unsigned char *bits, UINT bsize,
2084 const char *desc)
2085{
2086 unsigned char buf[MF_BUFSIZE];
2087 UINT mfsize, i;
2088 int diff;
2089
2090 mfsize = GetMetaFileBitsEx (mf, MF_BUFSIZE, buf);
2091 ok (mfsize > 0, "%s: GetMetaFileBitsEx failed.\n", desc);
2092 if (mfsize < MF_BUFSIZE)
2093 ok (mfsize == bsize, "%s: mfsize=%d, bsize=%d.\n",
2094 desc, mfsize, bsize);
2095 else
2096 ok (bsize >= MF_BUFSIZE, "%s: mfsize > bufsize (%d bytes), bsize=%d.\n",
2097 desc, mfsize, bsize);
2098 if (mfsize != bsize)
2099 return -1;
2100
2101 diff = 0;
2102 for (i=0; i<bsize; i++)
2103 {
2104 if (buf[i] != bits[i])
2105 diff++;
2106 }
2107 ok (diff == 0, "%s: mfsize=%d, bsize=%d, diff=%d\n",
2108 desc, mfsize, bsize, diff);
2109
2110 return diff;
2111}
2112
2113static int compare_mf_disk_bits(LPCSTR name, const BYTE *bits, UINT bsize, const char *desc)
2114{
2115 unsigned char buf[MF_BUFSIZE];
2116 DWORD mfsize, rd_size, i;
2117 int diff;
2118 HANDLE hfile;
2119 BOOL ret;
2120
2122 assert(hfile != INVALID_HANDLE_VALUE);
2123
2124 mfsize = GetFileSize(hfile, NULL);
2125 assert(mfsize <= MF_BUFSIZE);
2126
2127 ret = ReadFile(hfile, buf, sizeof(buf), &rd_size, NULL);
2128 ok( ret && rd_size == mfsize, "ReadFile: error %ld\n", GetLastError());
2129
2130 CloseHandle(hfile);
2131
2132 ok(mfsize == bsize, "%s: mfsize=%ld, bsize=%d.\n", desc, mfsize, bsize);
2133
2134 if (mfsize != bsize)
2135 return -1;
2136
2137 diff = 0;
2138 for (i=0; i<bsize; i++)
2139 {
2140 if (buf[i] != bits[i])
2141 diff++;
2142 }
2143 ok(diff == 0, "%s: mfsize=%ld, bsize=%d, diff=%d\n",
2144 desc, mfsize, bsize, diff);
2145
2146 return diff;
2147}
2148
2149/* For debugging or dumping the raw EMFs produced by
2150 * new test functions.
2151 */
2152static void dump_emf_bits(const HENHMETAFILE mf, const char *desc)
2153{
2155 UINT mfsize, i;
2156
2157 if (!winetest_debug) return;
2158
2159 mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf);
2160 ok (mfsize > 0, "%s: GetEnhMetaFileBits failed\n", desc);
2161
2162 printf("EMF %s has bits:\n{\n ", desc);
2163 for (i = 0; i < mfsize; i++)
2164 {
2165 printf ("0x%02x", buf[i]);
2166 if (i == mfsize-1)
2167 printf ("\n");
2168 else if (i % 8 == 7)
2169 printf (",\n ");
2170 else
2171 printf (", ");
2172 }
2173 printf ("};\n");
2174}
2175
2176static void dump_emf_records(const HENHMETAFILE mf, const char *desc)
2177{
2178 BYTE *emf;
2180 UINT mfsize, offset;
2181
2182 if (!winetest_debug) return;
2183
2184 mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf);
2185 ok (mfsize > 0, "%s: GetEnhMetaFileBits error %ld\n", desc, GetLastError());
2186
2187 printf("EMF %s has records:\n", desc);
2188
2189 emf = buf;
2190 offset = 0;
2191 while(offset < mfsize)
2192 {
2193 EMR *emr = (EMR *)(emf + offset);
2194 printf("emr->iType %ld, emr->nSize %lu\n", emr->iType, emr->nSize);
2195 /*trace("emr->iType 0x%04lx, emr->nSize 0x%04lx\n", emr->iType, emr->nSize);*/
2196 offset += emr->nSize;
2197 }
2198}
2199
2200static void dump_emf_record(const ENHMETARECORD *emr, const char *desc)
2201{
2202 const BYTE *buf;
2203 DWORD i;
2204
2205 if (!winetest_debug) return;
2206
2207 printf ("%s: EMF record %lu has bits:\n{\n", desc, emr->iType);
2208 buf = (const BYTE *)emr;
2209 for (i = 0; i < emr->nSize; i++)
2210 {
2211 printf ("0x%02x", buf[i]);
2212 if (i == emr->nSize - 1)
2213 printf ("\n");
2214 else if (i % 8 == 7)
2215 printf (",\n");
2216 else
2217 printf (", ");
2218 }
2219 printf ("};\n");
2220}
2221
2222static void dump_EMREXTTEXTOUT(const EMREXTTEXTOUTW *eto)
2223{
2224 trace("rclBounds %ld,%ld - %ld,%ld\n", eto->rclBounds.left, eto->rclBounds.top,
2225 eto->rclBounds.right, eto->rclBounds.bottom);
2226 trace("iGraphicsMode %lu\n", eto->iGraphicsMode);
2227 trace("exScale: %f\n", eto->exScale);
2228 trace("eyScale: %f\n", eto->eyScale);
2229 trace("emrtext.ptlReference %ld,%ld\n", eto->emrtext.ptlReference.x, eto->emrtext.ptlReference.y);
2230 trace("emrtext.nChars %lu\n", eto->emrtext.nChars);
2231 trace("emrtext.offString %#lx\n", eto->emrtext.offString);
2232 trace("emrtext.fOptions %#lx\n", eto->emrtext.fOptions);
2233 trace("emrtext.rcl %ld,%ld - %ld,%ld\n", eto->emrtext.rcl.left, eto->emrtext.rcl.top,
2234 eto->emrtext.rcl.right, eto->emrtext.rcl.bottom);
2235 trace("emrtext.offDx %#lx\n", eto->emrtext.offDx);
2236}
2237
2238static BOOL match_emf_record(const ENHMETARECORD *emr1, const ENHMETARECORD *emr2,
2239 const char *desc, BOOL ignore_scaling)
2240{
2241 int diff;
2242
2243 ok(emr1->iType == emr2->iType, "%s: emr->iType %lu != %lu\n",
2244 desc, emr1->iType, emr2->iType);
2245
2246 ok(emr1->nSize == emr2->nSize, "%s: emr->nSize %lu != %lu\n",
2247 desc, emr1->nSize, emr2->nSize);
2248
2249 /* iType and nSize mismatches are fatal */
2250 if (emr1->iType != emr2->iType || emr1->nSize != emr2->nSize) return FALSE;
2251
2252 /* contents of EMR_GDICOMMENT are not interesting */
2253 if (emr1->iType == EMR_GDICOMMENT) return TRUE;
2254
2255 /* different Windows versions setup DC scaling differently when
2256 * converting an old style metafile to an EMF.
2257 */
2258 if (ignore_scaling && (emr1->iType == EMR_SETWINDOWEXTEX ||
2259 emr1->iType == EMR_SETVIEWPORTEXTEX))
2260 return TRUE;
2261
2262 if (emr1->iType == EMR_EXTTEXTOUTW || emr1->iType == EMR_EXTTEXTOUTA)
2263 {
2264 EMREXTTEXTOUTW *eto1, *eto2;
2265
2266 eto1 = malloc(emr1->nSize);
2267 memcpy(eto1, emr1, emr1->nSize);
2268 eto2 = malloc(emr2->nSize);
2269 memcpy(eto2, emr2, emr2->nSize);
2270
2271 /* different Windows versions setup DC scaling differently */
2272 eto1->exScale = eto1->eyScale = 0.0;
2273 eto2->exScale = eto2->eyScale = 0.0;
2274
2275 diff = memcmp(eto1, eto2, emr1->nSize);
2276 if (diff)
2277 {
2278 dump_EMREXTTEXTOUT(eto1);
2279 dump_EMREXTTEXTOUT(eto2);
2280 }
2281 free(eto1);
2282 free(eto2);
2283 }
2284 else if (emr1->iType == EMR_EXTSELECTCLIPRGN && !lstrcmpA(desc, "emf_clipping"))
2285 {
2286 diff = memcmp(emr1, emr2, emr1->nSize);
2287 }
2288 else if (emr1->iType == EMR_POLYBEZIERTO16 || emr1->iType == EMR_POLYBEZIER16)
2289 {
2290 EMRPOLYBEZIER16 *eto1, *eto2;
2291
2292 eto1 = (EMRPOLYBEZIER16*)emr1;
2293 eto2 = (EMRPOLYBEZIER16*)emr2;
2294
2295 diff = eto1->cpts != eto2->cpts;
2296 if(!diff)
2297 diff = memcmp(eto1->apts, eto2->apts, eto1->cpts * sizeof(POINTS));
2298 }
2299 else if (emr1->iType == EMR_POLYBEZIERTO || emr1->iType == EMR_POLYBEZIER)
2300 {
2301 EMRPOLYBEZIER *eto1, *eto2;
2302
2303 eto1 = (EMRPOLYBEZIER*)emr1;
2304 eto2 = (EMRPOLYBEZIER*)emr2;
2305
2306 diff = eto1->cptl != eto2->cptl;
2307 if(!diff)
2308 diff = memcmp(eto1->aptl, eto2->aptl, eto1->cptl * sizeof(POINTL));
2309 }
2310 else if (emr1->iType == EMR_PLGBLT && emr2->iType == EMR_PLGBLT)
2311 {
2312 EMRPLGBLT *eto1 = (EMRPLGBLT *)emr1;
2313 EMRPLGBLT *eto2 = (EMRPLGBLT *)emr2;
2314 diff = memcmp(emr1, emr2, sizeof(*emr1)) ||
2315 memcmp(&eto1->aptlDest, &eto2->aptlDest, emr1->nSize - FIELD_OFFSET(EMRPLGBLT, aptlDest));
2316 }
2317 else
2318 diff = memcmp(emr1, emr2, emr1->nSize);
2319
2320 ok(diff == 0, "%s: contents of record %lu don't match\n", desc, emr1->iType);
2321
2322 if (diff)
2323 {
2324 dump_emf_record(emr1, "expected bits");
2325 dump_emf_record(emr2, "actual bits");
2326 }
2327
2328 return diff == 0; /* report all non-fatal record mismatches */
2329}
2330
2331/* Compare the EMF produced by a test function with the
2332 * expected raw EMF data in "bits".
2333 * Return value is 0 for a perfect match,
2334 * -1 if lengths aren't equal,
2335 * otherwise returns the number of non-matching bytes.
2336 */
2337static int compare_emf_bits(const HENHMETAFILE mf, const unsigned char *bits,
2338 UINT bsize, const char *desc,
2339 BOOL ignore_scaling)
2340{
2341 unsigned char buf[MF_BUFSIZE];
2342 UINT mfsize, offset1, offset2;
2343 const ENHMETAHEADER *emh1, *emh2;
2344
2345 mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf);
2346 ok (mfsize > 0, "%s: GetEnhMetaFileBits error %ld\n", desc, GetLastError());
2347
2348 if (mfsize < MF_BUFSIZE)
2349 {
2350 ok(mfsize == bsize, "%s: mfsize=%d, bsize=%d\n", desc, mfsize, bsize);
2351 }
2352 else
2353 ok(bsize >= MF_BUFSIZE, "%s: mfsize > bufsize (%d bytes), bsize=%d\n",
2354 desc, mfsize, bsize);
2355
2356 /* basic things must match */
2357 emh1 = (const ENHMETAHEADER *)bits;
2358 emh2 = (const ENHMETAHEADER *)buf;
2359 ok(emh1->iType == EMR_HEADER, "expected EMR_HEADER, got %lu\n", emh1->iType);
2360 ok(emh1->nSize == sizeof(ENHMETAHEADER), "expected sizeof(ENHMETAHEADER), got %lu\n", emh1->nSize);
2361 ok(emh2->nBytes == mfsize, "expected emh->nBytes %u, got %lu\n", mfsize, emh2->nBytes);
2362 ok(emh1->dSignature == ENHMETA_SIGNATURE, "expected ENHMETA_SIGNATURE, got %lu\n", emh1->dSignature);
2363
2364 ok(emh1->iType == emh2->iType, "expected EMR_HEADER, got %lu\n", emh2->iType);
2365 ok(emh1->nSize == emh2->nSize,
2366 "expected nSize %lu, got %lu\n", emh1->nSize, emh2->nSize);
2367 ok(emh1->rclBounds.left == emh2->rclBounds.left, "%s: expected rclBounds.left = %ld, got %ld\n",
2368 desc, emh1->rclBounds.left, emh2->rclBounds.left);
2369 ok(emh1->rclBounds.top == emh2->rclBounds.top, "%s: expected rclBounds.top = %ld, got %ld\n",
2370 desc, emh1->rclBounds.top, emh2->rclBounds.top);
2371 ok(emh1->rclBounds.right == emh2->rclBounds.right, "%s: expected rclBounds.right = %ld, got %ld\n",
2372 desc, emh1->rclBounds.right, emh2->rclBounds.right);
2373 ok(emh1->rclBounds.bottom == emh2->rclBounds.bottom, "%s: expected rclBounds.bottom = %ld, got %ld\n",
2374 desc, emh1->rclBounds.bottom, emh2->rclBounds.bottom);
2375 ok(emh1->dSignature == emh2->dSignature, "expected dSignature %lu, got %lu\n", emh1->dSignature, emh2->dSignature);
2376 ok(emh1->nBytes == emh2->nBytes,
2377 "expected nBytes %lu, got %lu\n", emh1->nBytes, emh2->nBytes);
2378 ok(emh1->nRecords == emh2->nRecords, "expected nRecords %lu, got %lu\n", emh1->nRecords, emh2->nRecords);
2379
2380 offset1 = emh1->nSize;
2381 offset2 = emh2->nSize; /* Needed for Win9x/WinME/NT4 */
2382 while (offset1 < emh1->nBytes)
2383 {
2384 const ENHMETARECORD *emr1 = (const ENHMETARECORD *)(bits + offset1);
2385 const ENHMETARECORD *emr2 = (const ENHMETARECORD *)(buf + offset2);
2386
2387 if (winetest_debug > 1)
2388 trace("%s: EMF record %lu, size %lu/record %lu, size %lu\n",
2389 desc, emr1->iType, emr1->nSize, emr2->iType, emr2->nSize);
2390
2391 if (!match_emf_record(emr1, emr2, desc, ignore_scaling)) return -1;
2392
2393 /* We have already bailed out if iType or nSize don't match */
2394 offset1 += emr1->nSize;
2395 offset2 += emr2->nSize;
2396 }
2397 return 0;
2398}
2399
2400static const unsigned char EMF_STRETCHBLT_1BIT_3X3[] =
2401{
2402 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2403 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2404 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2406 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2407 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2408 0x2c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2409 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2410 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2411 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2412 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2413 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2414 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2415 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2416 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2417 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2418 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2419 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2420 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2422 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2425 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2426 0x6c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
2427 0x9c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2428 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2429 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2430 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
2431 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2432 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2434 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2435 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2436 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2437 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2438 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2439 0x14, 0x00, 0x00, 0x00
2440};
2441
2442static const unsigned char EMF_STRETCHBLT_4BIT_3X3[] =
2443{
2444 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2445 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2446 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2447 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2448 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2449 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2450 0x64, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2451 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2453 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2454 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2455 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2456 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2457 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2458 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2459 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2460 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2461 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2462 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2464 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2465 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2466 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2467 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2468 0x6c, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,
2469 0xd4, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2470 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2471 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2472 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
2473 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2474 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2475 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2476 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2477 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2481 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2483 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2484 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2485 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2486 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2487 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2488 0x14, 0x00, 0x00, 0x00
2489};
2490
2491static const unsigned char EMF_STRETCHBLT_8BIT_3X3[] =
2492{
2493 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2494 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2495 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2496 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2497 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2498 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2499 0x24, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2500 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2501 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2502 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2503 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2504 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2505 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2506 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2507 0xa4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2508 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2509 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2510 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2511 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2513 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2514 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2515 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2516 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2517 0x6c, 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00,
2518 0x94, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2519 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2520 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2521 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
2522 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2523 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2525 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2526 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2527 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2528 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2529 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2530 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2532 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2534 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2535 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2536 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2537 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2538 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2539 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2540 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2542 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2543 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2544 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2545 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2546 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2547 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2548 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2549 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2550 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2551 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2552 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2553 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2554 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2555 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2557 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2558 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2559 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2560 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2561 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2562 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2563 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2564 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2565 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2566 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2567 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2568 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2569 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2570 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2571 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2572 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2573 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2575 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2576 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2577 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2579 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2580 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2581 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2582 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2583 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2584 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2585 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2586 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2587 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2588 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2589 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2590 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2591 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2592 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2593 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2596 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2597 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2598 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2600 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2601 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2604 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2605 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2606 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2607 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2608 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2609 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2610 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2611 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2612 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2613 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2614 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2615 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2616 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2617 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2618 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2619 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2621 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2622 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2623 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2625 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2626 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2627 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2628 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2630 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2631 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2632 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2633 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2634 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2635 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2636 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2637 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2638 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2639 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2640 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2641 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2642 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2643 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2644 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2646 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2647 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2648 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2649 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2650 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2651 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2652 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2653 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2654 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2655 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2656 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2657 0x14, 0x00, 0x00, 0x00
2658};
2659
2660static const unsigned char EMF_STRETCHBLT_16BIT_555_3X3[] =
2661{
2662 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2663 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2664 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2665 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2666 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2667 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2668 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2669 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2670 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2671 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2672 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2673 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2674 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2675 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2676 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2677 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2678 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2679 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2680 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2681 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2682 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2683 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2684 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2685 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2686 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
2687 0xa0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
2688 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2689 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2690 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
2691 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
2692 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2693 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2694 0x00, 0x7c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
2695 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2696 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2698 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2699 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
2700 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2701 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
2702};
2703
2704static const unsigned char EMF_STRETCHBLT_24BIT_3X3[] =
2705{
2706 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2707 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2708 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2709 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2710 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2711 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2712 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2713 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2714 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2715 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2716 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2717 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2718 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2719 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2720 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2721 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2722 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2723 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2724 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2725 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2726 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2727 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2728 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2729 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2730 0x6c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
2731 0x94, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
2732 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2733 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2734 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
2735 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
2736 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2737 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2738 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2739 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2740 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2741 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2743 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2744 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2745 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2746 0x14, 0x00, 0x00, 0x00
2747};
2748
2749static const unsigned char EMF_STRETCHBLT_32BIT_888_3X3[] =
2750{
2751 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2752 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2753 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2754 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2755 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2756 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2757 0x60, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2758 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2759 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2760 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2761 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2762 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2763 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2764 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2765 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2766 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2767 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2768 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2769 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2771 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2773 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2774 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2775 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
2776 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
2777 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2778 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2779 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
2780 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
2781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2783 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00,
2784 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2786 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2787 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2789 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2790 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2792 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
2793 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2794 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
2795};
2796
2797static const unsigned char EMF_STRETCHBLT_16BIT_3X3[] =
2798{
2799 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2801 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2803 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2804 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2805 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2806 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2807 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2808 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2809 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2811 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2812 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2813 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2814 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2815 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2816 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2817 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2818 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2819 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2820 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2821 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2822 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2823 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
2824 0xa0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
2825 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2826 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2827 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
2828 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
2829 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2830 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2831 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
2832 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2833 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2834 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2835 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2836 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
2837 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2838 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
2839};
2840
2841static const unsigned char EMF_STRETCHBLT_32BIT_3X3[] =
2842{
2843 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2844 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2845 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2846 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2847 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2848 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2849 0x60, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2850 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2852 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2853 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2854 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2855 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2856 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
2857 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2858 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2859 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2860 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2861 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2862 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2863 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2864 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2865 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2866 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2867 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
2868 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
2869 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2870 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2871 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
2872 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
2873 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2874 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2875 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
2876 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2877 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2878 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2879 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2880 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2881 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2882 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2883 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2884 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
2885 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2886 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
2887};
2888
2889static const unsigned char EMF_BITBLT_1BIT_4X4[] =
2890{
2891 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2892 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2893 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2894 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2895 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2896 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2897 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2898 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2899 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2900 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2901 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2902 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2903 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2904 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
2905 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2906 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2907 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2908 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2909 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2910 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2911 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2912 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2913 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2914 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2915 0x64, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
2916 0x94, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2917 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2918 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
2919 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2920 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2921 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2922 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2923 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2924 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2925 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2926 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2927 0x14, 0x00, 0x00, 0x00
2928};
2929
2930static const unsigned char EMF_BITBLT_4BIT_4X4[] =
2931{
2932 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2933 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2934 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2935 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2936 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2937 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2938 0x5c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2939 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2940 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2941 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2942 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2943 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2944 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2945 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
2946 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2947 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2948 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2949 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2950 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2951 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2952 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
2953 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
2954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2955 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2956 0x64, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,
2957 0xcc, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2958 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2959 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
2960 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2961 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2962 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2963 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
2964 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2965 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2967 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2968 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2969 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2973 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2974 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2975 0x14, 0x00, 0x00, 0x00
2976};
2977
2978static const unsigned char EMF_BITBLT_8BIT_4X4[] =
2979{
2980 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
2981 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2982 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2983 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2984 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
2985 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
2986 0x1c, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2987 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2988 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2989 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
2990 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
2991 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2992 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
2993 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
2994 0x9c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2995 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2996 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2997 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
2998 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
2999 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3000 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
3001 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
3002 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3003 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3004 0x64, 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00,
3005 0x8c, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3006 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3007 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
3008 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3009 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3010 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3011 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3012 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3014 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3015 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3016 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3017 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3018 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3019 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3020 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3021 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3022 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3023 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3024 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3025 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3026 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3027 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3028 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3029 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3031 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3032 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3033 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3034 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3035 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3036 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3037 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3038 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3039 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3040 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3041 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3042 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3043 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3044 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3045 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3046 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3049 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3050 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3051 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3052 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3053 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3054 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3055 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3056 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3057 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3058 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3059 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3060 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3061 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3062 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3063 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3064 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3065 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3066 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3067 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3068 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3069 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3070 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3071 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3072 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3073 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3074 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3075 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3076 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3077 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3078 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3079 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3080 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3081 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3082 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3083 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3084 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3085 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3086 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3087 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3088 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3089 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3091 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3092 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3093 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3094 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3095 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3096 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3097 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3098 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3099 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3116 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3117 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3118 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3119 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3120 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3122 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3123 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3124 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3125 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3126 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3127 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3129 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3130 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3133 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3137 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3141 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
3142 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3143 0x14, 0x00, 0x00, 0x00
3144};
3145
3146static const unsigned char EMF_BITBLT_16BIT_555_4X4[] =
3147{
3148 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
3149 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3150 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3152 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
3153 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
3154 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3155 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3157 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
3158 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
3159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3160 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
3161 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
3162 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3163 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3164 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3165 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3166 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
3167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3168 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
3169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
3170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3171 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3172 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
3173 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
3174 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3175 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
3176 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
3177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3179 0x00, 0x7c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
3180 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3184 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
3185 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3186 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
3187};
3188
3189static const unsigned char EMF_BITBLT_24BIT_4X4[] =
3190{
3191 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
3192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3193 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3194 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3195 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
3196 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
3197 0x3c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3198 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3200 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
3201 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
3202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3203 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
3204 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
3205 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3206 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3207 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3208 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3209 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
3210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3211 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
3212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
3213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3214 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3215 0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
3216 0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
3217 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3218 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
3219 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
3220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3221 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3228 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
3229 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3230 0x14, 0x00, 0x00, 0x00
3231};
3232
3233static const unsigned char EMF_BITBLT_32BIT_888_4X4[] =
3234{
3235 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
3236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3237 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3239 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
3240 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
3241 0x58, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3242 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3243 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3244 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
3245 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
3246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3247 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
3248 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
3249 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3250 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3251 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3252 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3253 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
3254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3255 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
3256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
3257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3258 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3259 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
3260 0x98, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
3261 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3262 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
3263 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
3264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3265 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3266 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00,
3267 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3268 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3271 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3272 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3273 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3275 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
3276 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3277 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
3278};
3279
3280static const unsigned char EMF_BITBLT_16BIT_4X4[] =
3281{
3282 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
3283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3284 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3285 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3286 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
3287 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
3288 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3289 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3290 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3291 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
3292 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
3293 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3294 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
3295 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
3296 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3297 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3298 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3299 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3300 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
3301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3302 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
3303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
3304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3305 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3306 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
3307 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
3308 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3309 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
3310 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
3311 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3313 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
3314 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3315 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3316 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3317 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3318 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
3319 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3320 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
3321};
3322
3323static const unsigned char EMF_BITBLT_32BIT_4X4[] =
3324{
3325 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
3326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3327 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3329 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
3330 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
3331 0x58, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3332 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3333 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3334 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
3335 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
3336 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3337 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
3338 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
3339 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3340 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3341 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3342 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3343 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
3344 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3345 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
3346 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
3347 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3348 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
3349 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
3350 0x98, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
3351 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3352 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
3353 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
3354 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3356 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
3357 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3358 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3359 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3361 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3363 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3364 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3365 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
3366 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3367 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
3368};
3369
3370/* tests blitting to an EMF */
3371static void test_emf_BitBlt(void)
3372{
3373 static const XFORM xform = {0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f};
3374 static const int bitmap_width = 4, bitmap_height = 4;
3375#ifdef __REACTOS__
3376 unsigned char bmi_buffer[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)];
3377#else
3378 unsigned char bmi_buffer[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
3379#endif
3380 BITMAPINFO *bmi = (BITMAPINFO *)bmi_buffer;
3381 HDC hdc, hdc_emf, hdc_emf2, hdc_bitmap;
3382 HBITMAP hbitmap, old_hbitmap;
3383 HENHMETAFILE hemf, hemf2;
3384 int ret, test_idx;
3385 void *bits;
3386
3387 static const struct
3388 {
3389 WORD bpp;
3390 int src_width;
3391 int src_height;
3393 const void *bits;
3394 size_t bits_count;
3395 DWORD used_color_count;
3396 DWORD color_count;
3397 RGBQUAD colors[3];
3398 }
3399 tests[] =
3400 {
3401 {1, 3, 3, BI_RGB, EMF_STRETCHBLT_1BIT_3X3, sizeof(EMF_STRETCHBLT_1BIT_3X3), 1, 1, {{0xff, 0xff, 0xff}}},
3402 {4, 3, 3, BI_RGB, EMF_STRETCHBLT_4BIT_3X3, sizeof(EMF_STRETCHBLT_4BIT_3X3), 1, 1, {{0xff, 0xff, 0xff}}},
3403 {8, 3, 3, BI_RGB, EMF_STRETCHBLT_8BIT_3X3, sizeof(EMF_STRETCHBLT_8BIT_3X3), 1, 1, {{0xff, 0xff, 0xff}}},
3407 {16, 3, 3, BI_BITFIELDS, EMF_STRETCHBLT_16BIT_3X3, sizeof(EMF_STRETCHBLT_16BIT_3X3), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
3408 {32, 3, 3, BI_BITFIELDS, EMF_STRETCHBLT_32BIT_3X3, sizeof(EMF_STRETCHBLT_32BIT_3X3), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
3409 {1, 4, 4, BI_RGB, EMF_BITBLT_1BIT_4X4, sizeof(EMF_BITBLT_1BIT_4X4), 1, 1, {{0xff, 0xff, 0xff}}},
3410 {4, 4, 4, BI_RGB, EMF_BITBLT_4BIT_4X4, sizeof(EMF_BITBLT_4BIT_4X4), 1, 1, {{0xff, 0xff, 0xff}}},
3411 {8, 4, 4, BI_RGB, EMF_BITBLT_8BIT_4X4, sizeof(EMF_BITBLT_8BIT_4X4), 1, 1, {{0xff, 0xff, 0xff}}},
3413 {24, 4, 4, BI_RGB, EMF_BITBLT_24BIT_4X4, sizeof(EMF_BITBLT_24BIT_4X4)},
3415 {16, 4, 4, BI_BITFIELDS, EMF_BITBLT_16BIT_4X4, sizeof(EMF_BITBLT_16BIT_4X4), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
3416 {32, 4, 4, BI_BITFIELDS, EMF_BITBLT_32BIT_4X4, sizeof(EMF_BITBLT_32BIT_4X4), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
3417 };
3418
3419 hdc = GetDC(0);
3420
3421 /* Test that source DC cannot be an enhanced metafile */
3422 hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
3423 ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
3424 hdc_emf2 = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
3425 ok(!!hdc_emf2, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
3426
3427 ret = StretchBlt(hdc_emf, 0, 0, 1, 1, hdc_emf2, 0, 0, 1, 1, SRCCOPY);
3428 ok(!ret, "StretchBlt succeeded\n");
3429
3430 hemf2 = CloseEnhMetaFile(hdc_emf2);
3431 ok(!!hemf2, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
3432 hemf = CloseEnhMetaFile(hdc_emf);
3433 ok(!!hemf, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
3434 DeleteEnhMetaFile(hemf2);
3435 DeleteEnhMetaFile(hemf);
3436
3437 for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx)
3438 {
3439 winetest_push_context("Test %d", test_idx);
3440
3441 memset(bmi_buffer, 0, sizeof(bmi_buffer));
3442 bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
3443 bmi->bmiHeader.biHeight = bitmap_width;
3444 bmi->bmiHeader.biWidth = bitmap_height;
3445 bmi->bmiHeader.biBitCount = tests[test_idx].bpp;
3446 bmi->bmiHeader.biPlanes = 1;
3447 bmi->bmiHeader.biCompression = tests[test_idx].compression;
3448 bmi->bmiHeader.biClrUsed = tests[test_idx].used_color_count;
3449 memcpy(bmi->bmiColors, tests[test_idx].colors, sizeof(RGBQUAD) * tests[test_idx].color_count);
3450
3452 ok(!!hbitmap, "CreateDIBSection failed, error %ld\n", GetLastError());
3453 hdc_bitmap = CreateCompatibleDC(hdc);
3454 ok(!!hdc_bitmap, "CreateCompatibleDC failed, error %ld\n", GetLastError());
3455 old_hbitmap = SelectObject(hdc_bitmap, hbitmap);
3456
3457 SetBkColor(hdc_bitmap, RGB(0xff, 0xff, 0xff));
3458 ret = SetGraphicsMode(hdc_bitmap, GM_ADVANCED);
3459 ok(ret, "SetGraphicsMode failed, error %ld\n", GetLastError());
3460 ret = SetWorldTransform(hdc_bitmap, &xform);
3461 ok(ret, "SetWorldTransform failed, error %ld\n", GetLastError());
3462
3463 hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
3464 ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
3465
3466 ret = BitBlt(hdc_bitmap, 0, 0, bitmap_width, bitmap_height, 0, 0, 0, BLACKNESS);
3467 ok(ret, "BitBlt failed, error %ld\n", GetLastError());
3468 if (tests[test_idx].src_width == bitmap_width && tests[test_idx].src_height == bitmap_height)
3469 {
3470 ret = BitBlt(hdc_emf, 0, 0, bitmap_width, bitmap_height, hdc_bitmap, 0, 0, SRCCOPY);
3471 ok(ret, "BitBlt failed, error %ld\n", GetLastError());
3472 }
3473 else
3474 {
3475 ret = StretchBlt(hdc_emf, 0, 0, bitmap_width, bitmap_height, hdc_bitmap, 0, 0,
3476 tests[test_idx].src_width, tests[test_idx].src_height, SRCCOPY);
3477 ok(ret, "StretchBlt failed, error %ld\n", GetLastError());
3478 }
3479
3480 hemf = CloseEnhMetaFile(hdc_emf);
3481 ok(!!hemf, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
3482
3483 ret = compare_emf_bits(hemf, tests[test_idx].bits, tests[test_idx].bits_count,
3484 "test_emf_BitBlt", FALSE);
3485 if (ret)
3486 {
3487 dump_emf_bits(hemf, "test_emf_BitBlt");
3488 dump_emf_records(hemf, "test_emf_BitBlt");
3489 }
3490
3491 DeleteEnhMetaFile(hemf);
3492 SelectObject(hdc_bitmap, old_hbitmap);
3493 DeleteDC(hdc_bitmap);
3495
3497 }
3498
3499 ReleaseDC(0, hdc);
3500}
3501
3502static void test_emf_DCBrush(void)
3503{
3504 HDC hdcMetafile;
3505 HENHMETAFILE hMetafile;
3506 HBRUSH hBrush;
3507 HPEN hPen;
3508 BOOL ret;
3510
3511 if (!pSetDCBrushColor || !pSetDCPenColor)
3512 {
3513 win_skip( "SetDCBrush/PenColor not supported\n" );
3514 return;
3515 }
3516
3517 hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
3518 ok( hdcMetafile != 0, "CreateEnhMetaFileA failed\n" );
3519
3520 hBrush = SelectObject(hdcMetafile, GetStockObject(DC_BRUSH));
3521 ok(hBrush != 0, "SelectObject error %ld.\n", GetLastError());
3522
3523 hPen = SelectObject(hdcMetafile, GetStockObject(DC_PEN));
3524 ok(hPen != 0, "SelectObject error %ld.\n", GetLastError());
3525
3526 color = pSetDCBrushColor( hdcMetafile, RGB(0x55,0x55,0x55) );
3527 ok( color == 0xffffff, "SetDCBrushColor returned %lx\n", color );
3528
3529 color = pSetDCPenColor( hdcMetafile, RGB(0x33,0x44,0x55) );
3530 ok( color == 0, "SetDCPenColor returned %lx\n", color );
3531
3532 Rectangle( hdcMetafile, 10, 10, 20, 20 );
3533
3534 color = pSetDCBrushColor( hdcMetafile, RGB(0x12,0x34,0x56) );
3535 ok( color == 0x555555, "SetDCBrushColor returned %lx\n", color );
3536
3537 hMetafile = CloseEnhMetaFile(hdcMetafile);
3538 ok( hMetafile != 0, "CloseEnhMetaFile failed\n" );
3539
3540 if (compare_emf_bits (hMetafile, EMF_DCBRUSH_BITS, sizeof(EMF_DCBRUSH_BITS),
3541 "emf_DC_Brush", FALSE ) != 0)
3542 {
3543 dump_emf_bits(hMetafile, "emf_DC_Brush");
3544 dump_emf_records(hMetafile, "emf_DC_Brush");
3545 }
3546 ret = DeleteEnhMetaFile(hMetafile);
3547 ok( ret, "DeleteEnhMetaFile error %ld\n", GetLastError());
3548 ret = DeleteObject(hBrush);
3549 ok( ret, "DeleteObject(HBRUSH) error %ld\n", GetLastError());
3550 ret = DeleteObject(hPen);
3551 ok( ret, "DeleteObject(HPEN) error %ld\n", GetLastError());
3552}
3553
3554/* Test a blank metafile. May be used as a template for new tests. */
3555
3556static void test_mf_Blank(void)
3557{
3558 HDC hdcMetafile;
3559 HMETAFILE hMetafile;
3560 INT caps;
3561 BOOL ret;
3562 INT type;
3563
3564 hdcMetafile = CreateMetaFileA(NULL);
3565 ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
3566
3567/* Tests on metafile initialization */
3568 caps = GetDeviceCaps (hdcMetafile, TECHNOLOGY);
3569 ok (caps == DT_METAFILE,
3570 "GetDeviceCaps: TECHNOLOGY=%d != DT_METAFILE.\n", caps);
3571
3572 hMetafile = CloseMetaFile(hdcMetafile);
3573 ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError());
3574 type = GetObjectType(hMetafile);
3575 ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type);
3576 type = GetObjectType(hdcMetafile);
3577 ok(type == 0 || broken(type == OBJ_METADC) /* win10 >=1607 */,
3578 "CloseMetaFile has to destroy metafile hdc (%d)\n", type);
3579
3580 if (compare_mf_bits (hMetafile, MF_BLANK_BITS, sizeof(MF_BLANK_BITS),
3581 "mf_blank") != 0)
3582 {
3583 dump_mf_bits(hMetafile, "mf_Blank");
3584 EnumMetaFile(0, hMetafile, mf_enum_proc, 0);
3585 }
3586
3587 ret = DeleteMetaFile(hMetafile);
3588 ok( ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError());
3589}
3590
3591static void test_metafile_file(void)
3592{
3593 char temp_path[MAX_PATH];
3594 char mf_name[MAX_PATH];
3595 char buf[4096];
3596 HMETAFILE metafile;
3597 POINT oldpoint;
3598 DWORD size;
3599 HANDLE file;
3600 HDC dc;
3601 BOOL ret;
3602
3604 GetTempFileNameA(temp_path, "wmf", 0, mf_name);
3605
3606 dc = CreateMetaFileA(mf_name);
3607 ok(dc != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
3608
3610 OPEN_EXISTING, 0, NULL);
3612 "CreateFile returned: %p %lu\n", file, GetLastError());
3613
3615 OPEN_EXISTING, 0, NULL);
3616 ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
3617
3619 ok(!size, "size = %lu\n", size);
3620
3621 ret = MoveToEx(dc, 1, 1, NULL);
3622 ok( ret, "MoveToEx error %ld.\n", GetLastError());
3623 ret = LineTo(dc, 2, 2);
3624 ok( ret, "LineTo error %ld.\n", GetLastError());
3625 ret = MoveToEx(dc, 1, 1, &oldpoint);
3626 ok( ret, "MoveToEx error %ld.\n", GetLastError());
3627 ret = Ellipse(dc, 0, 0, 2, 2);
3628 ok( ret, "Ellipse error %ld.\n", GetLastError());
3629
3630 ret = GetCurrentPositionEx(dc, &oldpoint);
3631 ok(!ret, "GetCurrentPositionEx succeeded\n");
3632
3634 ok(!size, "size = %lu\n", size);
3635
3638 ok(size == sizeof(MF_GRAPHICS_BITS), "size = %lu\n", size);
3639
3642 OPEN_EXISTING, 0, NULL);
3643 todo_wine
3645 "CreateFile returned: %p %lu\n", file, GetLastError());
3648 OPEN_EXISTING, 0, NULL);
3649 ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
3650 ret = ReadFile(file, buf, sizeof(buf), &size, NULL);
3651 ok(ret, "ReadFile failed: %lu\n", GetLastError());
3652 ok(size == sizeof(MF_GRAPHICS_BITS), "size = %lu\n", size);
3653 ok(!memcmp(buf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS)), "unexpected file content\n");
3655
3656 if (compare_mf_bits(metafile, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0)
3657 {
3658 dump_mf_bits(metafile, "mf_Graphics");
3660 }
3661
3663 ok(ret, "Could not delete metafile: %lu\n", GetLastError());
3664
3665 SetLastError(0xdeadbeef);
3667 ok(!ret, "DeleteMetaFile succeeded\n");
3668 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
3669
3670 SetLastError(0xdeadbeef);
3672 ok(!metafile && GetLastError() == ERROR_INVALID_HANDLE, "CloseMetaFile returned %p (%lu)\n",
3674
3675 ret = DeleteFileA(mf_name);
3676 ok(ret, "Could not delete file: %lu\n", GetLastError());
3677
3678 SetLastError(0xdeadbeef);
3679 ret = DeleteMetaFile(ULongToHandle(0xdeadbeef));
3680 ok(!ret, "DeleteMetaFile succeeded\n");
3681 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
3682
3683 SetLastError(0xdeadbeef);
3684 size = GetMetaFileBitsEx(ULongToHandle(0xdeadbeef), 0, NULL);
3685 ok(!size, "GetMetaFileBitsEx returned %lu\n", size);
3686 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
3687}
3688
3689static void test_mf_SetPixel(void)
3690{
3691 HMETAFILE mf;
3692 COLORREF c;
3693 BOOL ret;
3694 HDC hdc;
3695
3697 ok(hdc != 0, "CreateEnhMetaFile failed\n");
3698
3699 c = GetPixel(hdc, 5, 5);
3700 ok(c == CLR_INVALID, "c = %lx\n", c);
3701
3702 c = SetPixel(hdc, 5, 5, RGB(1,2,3));
3703 ok(c == 1, "c = %lx\n", c);
3704
3705 c = SetPixel(hdc, 5, 5, RGB(1,2,3));
3706 ok(c == 1, "c = %lx\n", c);
3707
3708 ret = SetPixelV(hdc, 5, 5, RGB(1,2,3));
3709 ok(ret, "ret = %x\n", ret);
3710
3711 c = GetPixel(hdc, 5, 5);
3712 ok(c == CLR_INVALID, "c = %lx\n", c);
3713
3714 ret = Rectangle(hdc, 1, 1, 10, 10);
3715 ok(ret, "Rectangle failed\n");
3716
3717 c = GetPixel(hdc, 5, 5);
3718 ok(c == CLR_INVALID, "c = %lx\n", c);
3719
3720 mf = CloseMetaFile(hdc);
3721 ok(mf != 0, "CloseEnhMetaFile failed\n");
3722 DeleteMetaFile(mf);
3723}
3724
3725static void test_mf_attrs(void)
3726{
3727 HMETAFILE mf;
3728 UINT attr;
3729 HDC hdc;
3730
3732 ok(hdc != 0, "CreateEnhMetaFile failed\n");
3733
3735 ok(attr == TRUE, "attr = %x\n", attr);
3737 ok(attr == TRUE, "attr = %x\n", attr);
3738
3740 ok(attr == TRUE, "attr = %x\n", attr);
3742 ok(attr == TRUE, "attr = %x\n", attr);
3743
3744 mf = CloseMetaFile(hdc);
3745 ok(mf != 0, "CloseEnhMetaFile failed\n");
3746 DeleteMetaFile(mf);
3747}
3748
3749static void test_enhmetafile_file(void)
3750{
3751 char temp_path[MAX_PATH];
3752 char mf_name[MAX_PATH];
3753 char buf[4096];
3754 HENHMETAFILE metafile;
3755 POINT pts[4];
3756 DWORD size;
3757 HANDLE file;
3758 HDC dc;
3759 BOOL ret;
3760
3762 GetTempFileNameA(temp_path, "wmf", 0, mf_name);
3763
3764 dc = CreateEnhMetaFileA(NULL, mf_name, NULL, NULL);
3765 ok(dc != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
3766
3768 OPEN_EXISTING, 0, NULL);
3770 "CreateFile returned: %p %lu\n", file, GetLastError());
3771
3773 OPEN_EXISTING, 0, NULL);
3774 ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
3775
3777 ok(!size, "size = %lu\n", size);
3778
3779 pts[0].x = pts[0].y = 10;
3780 pts[1].x = pts[1].y = 20;
3781 pts[2].x = pts[2].y = 15;
3782 pts[3].x = pts[3].y = 25;
3783 ret = PolyBezierTo(dc, pts, 3); /* EMR_POLYBEZIERTO16 */
3784 ok( ret, "PolyBezierTo failed\n" );
3785 ret = PolyBezier(dc, pts, 4); /* EMR_POLYBEZIER16 */
3786 ok( ret, "PolyBezier failed\n" );
3787
3788 pts[0].x = pts[0].y = 32769;
3789 ret = PolyBezier(dc, pts, 4); /* EMR_POLYBEZIER */
3790 ok( ret, "PolyBezier failed\n" );
3791 ret = PolyBezierTo(dc, pts, 3); /* EMR_POLYBEZIERTO */
3792 ok( ret, "PolyBezierTo failed\n" );
3793
3795 ok(!size, "size = %lu\n", size);
3796
3799 ok(size == sizeof(EMF_BEZIER_BITS), "size = %lu\n", size);
3800
3803 OPEN_EXISTING, 0, NULL);
3804 todo_wine
3806 "CreateFile returned: %p %lu\n", file, GetLastError());
3809 OPEN_EXISTING, 0, NULL);
3810 ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
3811 ret = ReadFile(file, buf, sizeof(buf), &size, NULL);
3812 ok(ret, "ReadFile failed: %lu\n", GetLastError());
3813 ok(size == sizeof(EMF_BEZIER_BITS), "size = %lu\n", size);
3815
3816 if (compare_emf_bits(metafile, EMF_BEZIER_BITS, sizeof(EMF_BEZIER_BITS), "emf_Bezier", FALSE) != 0)
3817 {
3818 dump_emf_bits(metafile, "emf_Bezier");
3819 dump_emf_records(metafile, "emf_Bezier");
3820 }
3821
3823 ok(ret, "Could not delete emf: %lu\n", GetLastError());
3824
3825 SetLastError(0xdeadbeef);
3827 ok(!ret, "DeleteEnhMetaFile succeeded\n");
3828 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
3829
3830 SetLastError(0xdeadbeef);
3832 ok(!metafile && GetLastError() == ERROR_INVALID_HANDLE, "CloseMetaFile returned %p (%lu)\n",
3834
3835 ret = DeleteFileA(mf_name);
3836 ok(ret, "Could not delete file: %lu\n", GetLastError());
3837
3838 SetLastError(0xdeadbeef);
3839 ret = DeleteEnhMetaFile(ULongToHandle(0xdeadbeef));
3840 ok(!ret, "DeleteEnhMetaFile succeeded\n");
3841 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
3842
3843 SetLastError(0xdeadbeef);
3844 size = GetEnhMetaFileBits(ULongToHandle(0xdeadbeef), 0, NULL);
3845 ok(!size, "GetEnhMetaFileBitsEx returned %lu\n", size);
3846 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
3847}
3848
3849static void test_emf_SetPixel(void)
3850{
3851 HENHMETAFILE emf;
3852 COLORREF c;
3853 BOOL ret;
3854 HDC hdc;
3855
3857 ok(hdc != 0, "CreateEnhMetaFile failed\n");
3858
3859 c = GetPixel(hdc, 5, 5);
3860 ok(c == CLR_INVALID, "c = %lx\n", c);
3861
3862 c = SetPixel(hdc, 5, 5, RGB(1,2,3));
3863 ok(c == CLR_INVALID, "c = %lx\n", c);
3864
3865 ret = SetPixelV(hdc, 5, 5, RGB(1,2,3));
3866 ok(!ret, "ret = %x\n", ret);
3867
3868 c = GetPixel(hdc, 5, 5);
3869 ok(c == CLR_INVALID, "c = %lx\n", c);
3870
3871 ret = Rectangle(hdc, 1, 1, 10, 10);
3872 ok(ret, "Rectangle failed\n");
3873
3874 c = GetPixel(hdc, 5, 5);
3875 ok(c == CLR_INVALID, "c = %lx\n", c);
3876
3878 ok(emf != 0, "CloseEnhMetaFile failed\n");
3880}
3881
3882static void test_emf_attrs(void)
3883{
3884 HENHMETAFILE mf;
3885 UINT attr;
3886 HDC hdc;
3887
3889 ok(hdc != 0, "CreateEnhMetaFile failed\n");
3890
3892 ok(attr == 0, "attr = %x\n", attr);
3894 ok(attr == TA_BOTTOM, "attr = %x\n", attr);
3895
3897 ok(attr == OPAQUE, "attr = %x\n", attr);
3899 ok(attr == TRANSPARENT, "attr = %x\n", attr);
3900
3901 mf = CloseEnhMetaFile(hdc);
3902 ok(mf != 0, "CloseEnhMetaFile failed\n");
3904}
3905
3906static void test_CopyMetaFile(void)
3907{
3908 HDC hdcMetafile;
3909 HMETAFILE hMetafile, hmf_copy;
3910 BOOL ret;
3911 char temp_path[MAX_PATH];
3912 char mf_name[MAX_PATH];
3913 INT type;
3914
3915 hdcMetafile = CreateMetaFileA(NULL);
3916 ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
3917
3918 hMetafile = CloseMetaFile(hdcMetafile);
3919 ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError());
3920 type = GetObjectType(hMetafile);
3921 ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type);
3922
3923 if (compare_mf_bits (hMetafile, MF_BLANK_BITS, sizeof(MF_BLANK_BITS),
3924 "mf_blank") != 0)
3925 {
3926 dump_mf_bits(hMetafile, "mf_Blank");
3927 EnumMetaFile(0, hMetafile, mf_enum_proc, 0);
3928 }
3929
3931 GetTempFileNameA(temp_path, "wmf", 0, mf_name);
3932
3933 hmf_copy = CopyMetaFileA(hMetafile, mf_name);
3934 ok(hmf_copy != 0, "CopyMetaFile error %ld\n", GetLastError());
3935
3936 type = GetObjectType(hmf_copy);
3937 ok(type == OBJ_METAFILE, "CopyMetaFile created object with type %d\n", type);
3938
3939 ret = DeleteMetaFile(hMetafile);
3940 ok( ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError());
3941
3942 if (compare_mf_disk_bits(mf_name, MF_BLANK_BITS, sizeof(MF_BLANK_BITS), "mf_blank") != 0)
3943 {
3944 dump_mf_bits(hmf_copy, "mf_Blank");
3945 EnumMetaFile(0, hmf_copy, mf_enum_proc, 0);
3946 }
3947
3948 ret = DeleteMetaFile(hmf_copy);
3949 ok( ret, "DeleteMetaFile(%p) error %ld\n", hmf_copy, GetLastError());
3950
3951 DeleteFileA(mf_name);
3952}
3953
3954static void test_SetMetaFileBits(void)
3955{
3956 HMETAFILE hmf;
3957 INT type;
3958 BOOL ret;
3959 BYTE buf[256];
3960 METAHEADER *mh;
3961
3963 ok(hmf != 0, "SetMetaFileBitsEx error %ld\n", GetLastError());
3964 type = GetObjectType(hmf);
3965 ok(type == OBJ_METAFILE, "SetMetaFileBitsEx created object with type %d\n", type);
3966
3967 if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0)
3968 {
3969 dump_mf_bits(hmf, "mf_Graphics");
3970 EnumMetaFile(0, hmf, mf_enum_proc, 0);
3971 }
3972
3973 ret = DeleteMetaFile(hmf);
3974 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
3975
3976 /* NULL data crashes XP SP1 */
3977 /*hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), NULL);*/
3978
3979 /* Now with zero size */
3980 SetLastError(0xdeadbeef);
3982 ok(!hmf, "SetMetaFileBitsEx should fail\n");
3983 ok(GetLastError() == ERROR_INVALID_DATA, "wrong error %ld\n", GetLastError());
3984
3985 /* Now with odd size */
3986 SetLastError(0xdeadbeef);
3988 ok(!hmf, "SetMetaFileBitsEx should fail\n");
3989 ok(GetLastError() == 0xdeadbeef /* XP SP1 */, "wrong error %ld\n", GetLastError());
3990
3991 /* Now with zeroed out header fields */
3992 assert(sizeof(buf) >= sizeof(MF_GRAPHICS_BITS));
3994 mh = (METAHEADER *)buf;
3995 /* corruption of any of the below fields leads to a failure */
3996 mh->mtType = 0;
3997 mh->mtVersion = 0;
3998 mh->mtHeaderSize = 0;
3999 SetLastError(0xdeadbeef);
4000 hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf);
4001 ok(!hmf, "SetMetaFileBitsEx should fail\n");
4002 ok(GetLastError() == ERROR_INVALID_DATA, "wrong error %ld\n", GetLastError());
4003
4004 /* Now with corrupted mtSize field */
4006 mh = (METAHEADER *)buf;
4007 /* corruption of mtSize doesn't lead to a failure */
4008 mh->mtSize *= 2;
4009 hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf);
4010 ok(hmf != 0, "SetMetaFileBitsEx error %ld\n", GetLastError());
4011
4012 if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0)
4013 {
4014 dump_mf_bits(hmf, "mf_Graphics");
4015 EnumMetaFile(0, hmf, mf_enum_proc, 0);
4016 }
4017
4018 ret = DeleteMetaFile(hmf);
4019 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
4020
4021#ifndef _WIN64 /* Generates access violation on XP x64 and Win2003 x64 */
4022 /* Now with zeroed out mtSize field */
4024 mh = (METAHEADER *)buf;
4025 /* zeroing mtSize doesn't lead to a failure */
4026 mh->mtSize = 0;
4027 hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf);
4028 ok(hmf != 0, "SetMetaFileBitsEx error %ld\n", GetLastError());
4029
4030 if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0)
4031 {
4032 dump_mf_bits(hmf, "mf_Graphics");
4033 EnumMetaFile(0, hmf, mf_enum_proc, 0);
4034 }
4035
4036 ret = DeleteMetaFile(hmf);
4037 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
4038#endif
4039}
4040
4041/* Simple APIs from mfdrv/graphics.c
4042 */
4043
4044static void test_mf_Graphics(void)
4045{
4046 HDC hdcMetafile;
4047 HMETAFILE hMetafile;
4048 POINT oldpoint;
4049 INT type;
4050 BOOL ret;
4051
4052 static const POINT points[] = { {1, 1}, {2, 2} };
4053 static const BYTE types[] = { PT_MOVETO, PT_LINETO };
4054
4055 hdcMetafile = CreateMetaFileA(NULL);
4056 ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
4057
4058 ret = MoveToEx(hdcMetafile, 1, 1, NULL);
4059 ok( ret, "MoveToEx error %ld.\n", GetLastError());
4060 ret = LineTo(hdcMetafile, 2, 2);
4061 ok( ret, "LineTo error %ld.\n", GetLastError());
4062
4063 oldpoint.x = oldpoint.y = 0xdeadbeef;
4064 ret = MoveToEx(hdcMetafile, 1, 1, &oldpoint);
4065 ok( ret, "MoveToEx error %ld.\n", GetLastError());
4066 ok(oldpoint.x == 0xdeadbeef && oldpoint.y == 0xdeadbeef,
4067 "MoveToEx modified oldpoint\n");
4068
4069 ret = Ellipse(hdcMetafile, 0, 0, 2, 2);
4070 ok( ret, "Ellipse error %ld.\n", GetLastError());
4071
4072 ret = ArcTo(hdcMetafile, 1, 2, 30, 40, 11, 12, 23, 24 );
4073 ok( !ret, "ArcTo succeeded\n" );
4074
4075 SetLastError(0xdeadbeef);
4076 ret = PolyDraw(hdcMetafile, points, types, ARRAY_SIZE(points));
4077 ok(!ret, "PolyDraw succeeded\n");
4078 todo_wine
4079 ok(GetLastError() == 0xdeadbeef, "GetLastError() = %lu\n", GetLastError());
4080
4081 hMetafile = CloseMetaFile(hdcMetafile);
4082 ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError());
4083 type = GetObjectType(hdcMetafile);
4084 ok(type == 0 || broken(type == OBJ_METADC) /* win10 >=1607 */,
4085 "CloseMetaFile has to destroy metafile hdc (%d)\n", type);
4086
4087 if (compare_mf_bits (hMetafile, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS),
4088 "mf_Graphics") != 0)
4089 {
4090 dump_mf_bits(hMetafile, "mf_Graphics");
4091 EnumMetaFile(0, hMetafile, mf_enum_proc, 0);
4092 }
4093
4094 ret = DeleteMetaFile(hMetafile);
4095 ok( ret, "DeleteMetaFile(%p) error %ld\n",
4096 hMetafile, GetLastError());
4097}
4098
4099static void test_mf_FloodFill(void)
4100{
4101 HMETAFILE mf;
4102 HDC hdc;
4103 BOOL ret;
4104
4105 static const unsigned char floodfill_bits[] =
4106 {
4107 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x24, 0x00,
4108 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
4109 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x48, 0x05,
4110 0x00, 0x00, 0x03, 0x04, 0x05, 0x00, 0x02, 0x00,
4111 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x48, 0x05,
4112 0x00, 0x00, 0x08, 0x09, 0x0a, 0x00, 0x07, 0x00,
4113 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x48, 0x05,
4114 0x01, 0x00, 0x12, 0x13, 0x14, 0x00, 0x11, 0x00,
4115 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
4116 };
4117
4119 ok(hdc != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
4120
4121 ret = FloodFill(hdc, 1, 2, RGB(3,4,5));
4122 ok(ret, "FloodFill failed\n");
4123
4124 ret = ExtFloodFill(hdc, 6, 7, RGB(8,9,10), FLOODFILLBORDER);
4125 ok(ret, "FloodFill failed\n");
4126
4127 ret = ExtFloodFill(hdc, 16, 17, RGB(18,19,20), FLOODFILLSURFACE);
4128 ok(ret, "FloodFill failed\n");
4129
4130 mf = CloseMetaFile(hdc);
4131 ok(mf != 0, "CloseMetaFile error %ld\n", GetLastError());
4132
4133 if (compare_mf_bits (mf, floodfill_bits, sizeof(floodfill_bits),
4134 "mf_FloodFill") != 0)
4135 {
4136 dump_mf_bits(mf, "mf_FloodFill");
4137 EnumMetaFile(0, mf, mf_enum_proc, 0);
4138 }
4139
4140 ret = DeleteMetaFile(mf);
4141 ok(ret, "DeleteMetaFile(%p) error %ld\n", mf, GetLastError());
4142}
4143
4144static void test_mf_PatternBrush(void)
4145{
4146 char buffer[sizeof(BITMAPINFOHEADER) + (2 + 32 * 32 / 8) * sizeof(RGBQUAD)];
4148 HDC hdcMetafile;
4149 HMETAFILE hMetafile;
4150 LOGBRUSH *orig_lb;
4151 HBRUSH hBrush, dib_brush;
4152 DWORD *bits;
4153 unsigned int i;
4154 BOOL ret;
4155 INT type;
4156
4157 orig_lb = calloc(1, sizeof(LOGBRUSH));
4158
4159 orig_lb->lbStyle = BS_PATTERN;
4160 orig_lb->lbColor = RGB(0, 0, 0);
4161 orig_lb->lbHatch = (ULONG_PTR)CreateBitmap (8, 8, 1, 1, SAMPLE_PATTERN_BRUSH);
4162 ok((HBITMAP)orig_lb->lbHatch != NULL, "CreateBitmap error %ld.\n", GetLastError());
4163
4164 hBrush = CreateBrushIndirect (orig_lb);
4165 ok(hBrush != 0, "CreateBrushIndirect error %ld\n", GetLastError());
4166
4167 hdcMetafile = CreateMetaFileA(NULL);
4168 ok(hdcMetafile != 0, "CreateMetaFileA error %ld\n", GetLastError());
4169
4170 hBrush = SelectObject(hdcMetafile, hBrush);
4171 ok(hBrush != 0, "SelectObject error %ld.\n", GetLastError());
4172
4173 memset(info, 0, sizeof(buffer));
4174 info->bmiHeader.biSize = sizeof(info->bmiHeader);
4175 info->bmiHeader.biHeight = 32;
4176 info->bmiHeader.biWidth = 32;
4177 info->bmiHeader.biBitCount = 1;
4178 info->bmiHeader.biPlanes = 1;
4179 info->bmiHeader.biCompression = BI_RGB;
4180 bits = (DWORD *)info->bmiColors;
4181 for (i = 0; i < 32 * 32 / 8; i++) bits[i] = i;
4182
4184 ok(dib_brush != NULL, "CreatePatternBrush failed\n");
4185
4186 dib_brush = SelectObject(hdcMetafile, dib_brush);
4187 ok(dib_brush != 0, "SelectObject error %ld.\n", GetLastError());
4188
4189 hMetafile = CloseMetaFile(hdcMetafile);
4190 ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError());
4191 type = GetObjectType(hdcMetafile);
4192 ok(type == 0 || broken(type == OBJ_METADC) /* win10 >=1607 */,
4193 "CloseMetaFile has to destroy metafile hdc (%d)\n", type);
4194
4196 "mf_Pattern_Brush") != 0)
4197 {
4198 dump_mf_bits(hMetafile, "mf_Pattern_Brush");
4199 EnumMetaFile(0, hMetafile, mf_enum_proc, 0);
4200 }
4201
4202 ret = DeleteMetaFile(hMetafile);
4203 ok( ret, "DeleteMetaFile error %ld\n", GetLastError());
4204 ret = DeleteObject(hBrush);
4205 ok( ret, "DeleteObject(HBRUSH) error %ld\n", GetLastError());
4206 ret = DeleteObject(dib_brush);
4207 ok(ret, "DeleteObject failed\n");
4208 ret = DeleteObject((HBITMAP)orig_lb->lbHatch);
4209 ok( ret, "DeleteObject(HBITMAP) error %ld\n",
4210 GetLastError());
4211 free(orig_lb);
4212}
4213
4215 const ENHMETARECORD *rec, int n, LPARAM arg)
4216{
4217 LOGBRUSH brush;
4218 BOOL ret;
4219
4220 switch (rec->iType)
4221 {
4222 case EMR_HEADER:
4223 case EMR_SELECTOBJECT:
4224 case EMR_EOF:
4226 return 1;
4228 ok(!htable->objectHandle[2], "objectHandle[2] already used\n");
4229 ret = PlayEnhMetaFileRecord(hdc, htable, rec, n);
4230 ok(ret, "PlayEnhMetaFileRecord failed\n");
4231 ok(htable->objectHandle[2] != NULL, "objectHandle[2] not created\n");
4232
4233 ret = GetObjectW(htable->objectHandle[2], sizeof(brush), &brush);
4234 ok(ret, "GetObjectW failed\n");
4235 ok(brush.lbStyle == BS_DIBPATTERN, "brush.lbStyle = %d\n", brush.lbStyle);
4236 ok(brush.lbHatch > (ULONG_PTR)rec && brush.lbHatch < (ULONG_PTR)rec + rec->nSize,
4237 "brush.lbHatch = %p, not in %p-%p range\n",
4238 (void *)brush.lbHatch, rec, (const BYTE *)rec + rec->nSize);
4239 return 1;
4240 default:
4241 ok(0, "unexpected record %lu\n", rec->iType);
4242 return 0;
4243 }
4244}
4245
4246static void test_emf_pattern_brush(void)
4247{
4248 char buffer[sizeof(BITMAPINFOHEADER) + (2 + 32 * 32 / 8) * sizeof(RGBQUAD)];
4250 HDC hdc;
4251 HENHMETAFILE emf;
4252 LOGBRUSH *orig_lb;
4253 HBRUSH bitmap_brush, dib_brush;
4254 DWORD *bits;
4255 unsigned int i;
4256 BOOL ret;
4257
4258 orig_lb = calloc(1, sizeof(LOGBRUSH));
4259
4260 orig_lb->lbStyle = BS_PATTERN;
4261 orig_lb->lbColor = RGB(0, 0, 0);
4262 orig_lb->lbHatch = (ULONG_PTR)CreateBitmap(8, 8, 1, 1, SAMPLE_PATTERN_BRUSH);
4263 ok((HBITMAP)orig_lb->lbHatch != NULL, "CreateBitmap error %ld.\n", GetLastError());
4264
4265 bitmap_brush = CreateBrushIndirect(orig_lb);
4266 ok(bitmap_brush != 0, "CreateBrushIndirect error %ld\n", GetLastError());
4267
4269 ok(hdc != 0, "CreateMetaFileA error %ld\n", GetLastError());
4270
4271 bitmap_brush = SelectObject(hdc, bitmap_brush);
4272 ok(bitmap_brush != 0, "SelectObject error %ld.\n", GetLastError());
4273
4274 memset(info, 0, sizeof(buffer));
4275 info->bmiHeader.biSize = sizeof(info->bmiHeader);
4276 info->bmiHeader.biHeight = 32;
4277 info->bmiHeader.biWidth = 32;
4278 info->bmiHeader.biBitCount = 1;
4279 info->bmiHeader.biPlanes = 1;
4280 info->bmiHeader.biCompression = BI_RGB;
4281 bits = (DWORD *)info->bmiColors;
4282 for (i = 0; i < 32 * 32 / 8; i++) bits[i] = i;
4283
4285 ok(dib_brush != NULL, "CreatePatternBrush failed\n");
4286
4287 dib_brush = SelectObject(hdc, dib_brush);
4288 ok(dib_brush != 0, "SelectObject error %ld.\n", GetLastError());
4289
4291 ok(emf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
4292
4294 "emf_pattern_brush", FALSE))
4295 {
4296 dump_emf_bits(emf, "emf_pattern_brush");
4297 dump_emf_records(emf, "emf_pattern_brush");
4298 }
4299
4300 ret = DeleteObject(bitmap_brush);
4301 ok(ret, "DeleteObject failed\n");
4302 ret = DeleteObject(dib_brush);
4303 ok(ret, "DeleteObject failed\n");
4304 ret = DeleteObject((HBITMAP)orig_lb->lbHatch);
4305 ok(ret, "DeleteObject failed\n");
4306 free(orig_lb);
4307
4309 ok(ret, "EnumEnhMetaFile error %ld\n", GetLastError());
4311 ok(ret, "DeleteMetaFile error %ld\n", GetLastError());
4312}
4313
4314static void test_mf_palette_brush(void)
4315{
4316 char buffer[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD) + 16 * 16];
4318 WORD *indices = (WORD *)info->bmiColors;
4319 char pal_buffer[sizeof(LOGPALETTE) + 256 * sizeof(PALETTEENTRY)];
4320 LOGPALETTE *pal = (LOGPALETTE *)pal_buffer;
4322 HMETAFILE metafile;
4323 HBRUSH brush;
4324 int i;
4325 HPALETTE palette;
4326
4327 memset( info, 0, sizeof(*info) );
4328 info->bmiHeader.biSize = sizeof(info->bmiHeader);
4329 info->bmiHeader.biWidth = 16;
4330 info->bmiHeader.biHeight = 16;
4331 info->bmiHeader.biPlanes = 1;
4332 info->bmiHeader.biBitCount = 8;
4333 info->bmiHeader.biCompression = BI_RGB;
4334
4335 for (i = 0; i < 256; i++) indices[i] = 255 - i;
4336 for (i = 0; i < 256; i++) ((BYTE *)(indices + 256))[i] = i;
4338 ok( brush != NULL, "CreateDIBPatternBrushPt failed\n" );
4339
4340 pal->palVersion = 0x300;
4341 pal->palNumEntries = 256;
4342 for (i = 0; i < 256; i++)
4343 {
4344 pal->palPalEntry[i].peRed = i * 2;
4345 pal->palPalEntry[i].peGreen = i * 2;
4346 pal->palPalEntry[i].peBlue = i * 2;
4347 pal->palPalEntry[i].peFlags = 0;
4348 }
4349 palette = CreatePalette(pal);
4350
4351 ok(SelectPalette(hdc, palette, 0) != NULL, "SelectPalette failed\n");
4352 ok(SelectObject(hdc, brush) != NULL, "SelectObject failed\n");
4353
4354 DeleteObject(brush);
4356
4359 "mf_Palette_Pattern_Brush") != 0)
4360 {
4361 dump_mf_bits(metafile, "mf_Palette_Pattern_Brush");
4363 }
4365}
4366
4367static void test_mf_DCBrush(void)
4368{
4369 HDC hdcMetafile;
4370 HMETAFILE hMetafile;
4371 HBRUSH hBrush;
4372 HPEN hPen;
4373 BOOL ret;
4375
4376 if (!pSetDCBrushColor || !pSetDCPenColor)
4377 {
4378 win_skip( "SetDCBrush/PenColor not supported\n" );
4379 return;
4380 }
4381
4382 hdcMetafile = CreateMetaFileA(NULL);
4383 ok( hdcMetafile != 0, "CreateMetaFileA failed\n" );
4384
4385 hBrush = SelectObject(hdcMetafile, GetStockObject(DC_BRUSH));
4386 ok(hBrush != 0, "SelectObject error %ld.\n", GetLastError());
4387
4388 hPen = SelectObject(hdcMetafile, GetStockObject(DC_PEN));
4389 ok(hPen != 0, "SelectObject error %ld.\n", GetLastError());
4390
4391 color = pSetDCBrushColor( hdcMetafile, RGB(0x55,0x55,0x55) );
4392 ok( color == CLR_INVALID, "SetDCBrushColor returned %lx\n", color );
4393
4394 color = pSetDCPenColor( hdcMetafile, RGB(0x33,0x44,0x55) );
4395 ok( color == CLR_INVALID, "SetDCPenColor returned %lx\n", color );
4396
4397 Rectangle( hdcMetafile, 10, 10, 20, 20 );
4398
4399 color = pSetDCBrushColor( hdcMetafile, RGB(0x12,0x34,0x56) );
4400 ok( color == CLR_INVALID, "SetDCBrushColor returned %lx\n", color );
4401
4402 hMetafile = CloseMetaFile(hdcMetafile);
4403 ok( hMetafile != 0, "CloseMetaFile failed\n" );
4404
4405 if (compare_mf_bits(hMetafile, MF_DCBRUSH_BITS, sizeof(MF_DCBRUSH_BITS), "mf_DCBrush") != 0)
4406 {
4407 dump_mf_bits(hMetafile, "mf_DCBrush");
4408 EnumMetaFile(0, hMetafile, mf_enum_proc, 0);
4409 }
4410 ret = DeleteMetaFile(hMetafile);
4411 ok(ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError());
4412}
4413
4414static void test_mf_select(void)
4415{
4416 HMETAFILE hmf;
4417 HDC hdc, hdc2;
4418 HGDIOBJ obj;
4419 HPEN pen;
4420 int cnt;
4421 BOOL ret;
4422
4423 static const unsigned char select_bits[] =
4424 {
4425 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x4d, 0x00,
4426 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
4427 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x02,
4428 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
4429 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01, 0x00, 0x00,
4430 0x07, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x00, 0x00,
4431 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00,
4432 0x00, 0x00, 0x2d, 0x01, 0x01, 0x00, 0x08, 0x00,
4433 0x00, 0x00, 0xfa, 0x02, 0x00, 0x00, 0x01, 0x00,
4434 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x04, 0x00,
4435 0x00, 0x00, 0x2d, 0x01, 0x02, 0x00, 0x03, 0x00,
4436 0x00, 0x00, 0x1e, 0x00, 0x08, 0x00, 0x00, 0x00,
4437 0xfa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4438 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
4439 0x2d, 0x01, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00,
4440 0x27, 0x01, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00,
4441 0x2d, 0x01, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00,
4442 0xf0, 0x01, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
4443 0x27, 0x01, 0xfb, 0xff, 0x03, 0x00, 0x00, 0x00,
4444 0x00, 0x00
4445 };
4446
4447 static const unsigned char delete_not_selected_bits[] =
4448 {
4449 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x28, 0x00,
4450 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00,
4451 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xfa, 0x02,
4452 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
4453 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01,
4454 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xfa, 0x02,
4455 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4456 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01,
4457 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf0, 0x01,
4458 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
4459 };
4460
4461 static const unsigned char delete_selected_bits[] =
4462 {
4463 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x18, 0x00,
4464 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
4465 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xfa, 0x02,
4466 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
4467 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01,
4468 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
4469 };
4470
4472 ok(hdc != 0, "CreateMetaFileA failed\n");
4473
4474 obj = SelectObject(hdc, GetStockObject(DC_BRUSH));
4475 ok(obj == GetStockObject(WHITE_BRUSH), "brush is not a stock WHITE_BRUSH: %p\n", obj);
4476
4478 ok(obj == GetStockObject(DC_BRUSH), "brush is not a stock DC_BRUSH: %p\n", obj);
4479
4480 pen = CreatePen(PS_SOLID, 1, RGB(1,1,1));
4481 obj = SelectObject(hdc, pen);
4482 ok(obj == GetStockObject(BLACK_PEN), "pen is not a stock BLACK_PEN: %p\n", obj);
4483
4484 cnt = SaveDC(hdc);
4485 ok(cnt == 1, "cnt = %d\n", cnt);
4486
4488 ok(obj == pen, "unexpected pen: %p\n", obj);
4489
4490 ret = RestoreDC(hdc, -1);
4491 ok(ret, "RestoreDC failed\n");
4492
4494 /* pen is still black after RestoreDC */
4495 ok(obj == GetStockObject(BLACK_PEN), "unexpected pen: %p\n", obj);
4496 ret = DeleteObject(pen);
4497 ok(ret, "DeleteObject failed: %lu\n", GetLastError());
4498
4500 ok(!obj, "GetCurrentObject succeeded\n");
4501
4502 SetLastError(0xdeadbeef);
4505 "SelectObject returned %p (%lu).\n", obj, GetLastError());
4506
4507 ret = RestoreDC(hdc, -5);
4508 ok(ret, "RestoreDC failed\n");
4509
4510 hmf = CloseMetaFile(hdc);
4511 ok(hmf != 0, "CloseMetaFile failed\n");
4512
4513 if (compare_mf_bits(hmf, select_bits, sizeof(select_bits), "mf_select"))
4514 {
4515 dump_mf_bits(hmf, "mf_select");
4516 EnumMetaFile(0, hmf, mf_enum_proc, 0);
4517 }
4518
4519 ret = DeleteMetaFile(hmf);
4520 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
4521
4522 /* create two metafiles, select the same pen to both of them,
4523 * unselect it from only one and then delete */
4525 ok(hdc != 0, "CreateMetaFileA failed\n");
4527 ok(hdc2 != 0, "CreateMetaFileA failed\n");
4528
4529 pen = CreatePen(PS_SOLID, 1, RGB(1,1,1));
4530 obj = SelectObject(hdc, pen);
4531 ok(obj == GetStockObject(BLACK_PEN), "pen is not a stock BLACK_PEN: %p\n", obj);
4532 obj = SelectObject(hdc2, pen);
4533 ok(obj == GetStockObject(BLACK_PEN), "pen is not a stock BLACK_PEN: %p\n", obj);
4534
4536 ok(obj == pen, "unexpected pen: %p\n", obj);
4537 ret = DeleteObject(pen);
4538 ok(ret, "DeleteObject failed: %lu\n", GetLastError());
4539
4540 hmf = CloseMetaFile(hdc);
4541 ok(hmf != 0, "CloseMetaFile failed\n");
4542 if (compare_mf_bits(hmf, delete_not_selected_bits,
4543 sizeof(delete_not_selected_bits), "mf_delete_not_selected"))
4544 {
4545 dump_mf_bits(hmf, "mf_delete_not_selected");
4546 EnumMetaFile(0, hmf, mf_enum_proc, 0);
4547 }
4548 ret = DeleteMetaFile(hmf);
4549 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
4550
4551 hmf = CloseMetaFile(hdc2);
4552 ok(hmf != 0, "CloseMetaFile failed\n");
4553 if (compare_mf_bits(hmf, delete_selected_bits,
4554 sizeof(delete_selected_bits), "mf_delete_selected"))
4555 {
4556 dump_mf_bits(hmf, "mf_delete_selected");
4557 EnumMetaFile(0, hmf, mf_enum_proc, 0);
4558 }
4559 ret = DeleteMetaFile(hmf);
4560 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
4561}
4562
4563static void test_emf_select(void)
4564{
4565 HENHMETAFILE hemf;
4566 HDC hdc, hdc2;
4567 HGDIOBJ obj;
4568 HPEN pen;
4569 int cnt;
4570 BOOL ret;
4571
4572 static const unsigned char select_bits[] =
4573 {
4574 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
4575 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4576 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
4577 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4578 0xe6, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff,
4579 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
4580 0xf8, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
4581 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4582 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4583 0x09, 0x06, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00,
4584 0x99, 0x01, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00,
4585 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4586 0x00, 0x00, 0x00, 0x00, 0xcd, 0x3c, 0x06, 0x00,
4587 0x91, 0x29, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00,
4588 0x0c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x80,
4589 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4590 0x00, 0x00, 0x00, 0x80, 0x26, 0x00, 0x00, 0x00,
4591 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4592 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4593 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
4594 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4595 0x01, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
4596 0x08, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
4597 0x0c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80,
4598 0x22, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4599 0xff, 0xff, 0xff, 0xff, 0x25, 0x00, 0x00, 0x00,
4600 0x0c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80,
4601 0x28, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4602 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
4603 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4604 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
4605 };
4606
4607 static const unsigned char delete_not_selected_bits[] =
4608 {
4609 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
4610 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4611 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
4612 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4613 0xe6, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff,
4614 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
4615 0xc0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
4616 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4617 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4618 0x09, 0x06, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00,
4619 0x99, 0x01, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00,
4620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4621 0x00, 0x00, 0x00, 0x00, 0xcd, 0x3c, 0x06, 0x00,
4622 0x91, 0x29, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00,
4623 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4624 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4625 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
4626 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4627 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
4628 0x0c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80,
4629 0x28, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4630 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
4631 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4632 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
4633 };
4634
4635 static const unsigned char delete_selected_bits[] =
4636 {
4637 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
4638 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4639 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
4640 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4641 0xe6, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff,
4642 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
4643 0xb4, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
4644 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4646 0x09, 0x06, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00,
4647 0x99, 0x01, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00,
4648 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4649 0x00, 0x00, 0x00, 0x00, 0xcd, 0x3c, 0x06, 0x00,
4650 0x91, 0x29, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00,
4651 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4652 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4653 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
4654 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4655 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
4656 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4657 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
4658 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
4659 0x14, 0x00, 0x00, 0x00
4660 };
4661
4663 ok(hdc != 0, "CreateEnhMetaFileA failed\n");
4664
4665 obj = SelectObject(hdc, GetStockObject(DC_BRUSH));
4666 ok(obj == GetStockObject(WHITE_BRUSH), "brush is not a stock WHITE_BRUSH: %p\n", obj);
4667
4669 ok(obj == GetStockObject(DC_BRUSH), "brush is not a stock DC_BRUSH: %p\n", obj);
4670
4671 pen = CreatePen(PS_SOLID, 1, RGB(1,1,1));
4672 obj = SelectObject(hdc, pen);
4673 ok(obj == GetStockObject(BLACK_PEN), "pen is not a stock BLACK_PEN: %p\n", obj);
4674
4675 cnt = SaveDC(hdc);
4676 ok(cnt == 1, "cnt = %d\n", cnt);
4677
4679 ok(obj == pen, "unexpected pen: %p\n", obj);
4680
4681 ret = RestoreDC(hdc, -1);
4682 ok(ret, "RestoreDC failed\n");
4683
4685 /* pen is still black after RestoreDC */
4686 ok(obj == pen, "unexpected pen: %p\n", obj);
4687 ret = DeleteObject(pen);
4688 ok(ret, "DeleteObject failed: %lu\n", GetLastError());
4689
4691 ok(obj == GetStockObject(BLACK_PEN), "GetCurrentObject returned %p\n", obj);
4692
4693 SetLastError(0xdeadbeef);
4695 ok(!obj, "SelectObject returned %p (%lu).\n", obj, GetLastError());
4696
4697 ret = RestoreDC(hdc, -5);
4698 ok(!ret, "RestoreDC succeeded\n");
4699
4700 hemf = CloseEnhMetaFile(hdc);
4701 ok(hemf != 0, "CloseEnhMetaFile failed\n");
4702
4703 if (compare_emf_bits(hemf, select_bits, sizeof(select_bits), "emf_select", FALSE))
4704 {
4705 dump_emf_bits(hemf, "emf_select");
4706 dump_emf_records(hemf, "emf_select");
4707 }
4708
4709 ret = DeleteEnhMetaFile(hemf);
4710 ok(ret, "DeleteEnhMetaFile(%p) error %ld\n", hemf, GetLastError());
4711
4712 /* create two EMFs, select the same pen to both of them,
4713 * unselect it from only one and then delete */
4715 ok(hdc != 0, "CreateEnhMetaFileA failed\n");
4717 ok(hdc2 != 0, "CreateEnhMetaFileA failed\n");
4718
4719 pen = CreatePen(PS_SOLID, 1, RGB(1,1,1));
4720 obj = SelectObject(hdc, pen);
4721 ok(obj == GetStockObject(BLACK_PEN), "pen is not a stock BLACK_PEN: %p\n", obj);
4722 obj = SelectObject(hdc2, pen);
4723 ok(obj == GetStockObject(BLACK_PEN), "pen is not a stock BLACK_PEN: %p\n", obj);
4724
4726 ok(obj == pen, "unexpected pen: %p\n", obj);
4727 ret = DeleteObject(pen);
4728 ok(ret, "DeleteObject failed: %lu\n", GetLastError());
4729
4730 hemf = CloseEnhMetaFile(hdc);
4731 ok(hemf != 0, "CloseEnhMetaFile failed\n");
4732 if (compare_emf_bits(hemf, delete_not_selected_bits, sizeof(delete_not_selected_bits),
4733 "emf_delete_not_selected", FALSE))
4734 {
4735 dump_emf_bits(hemf, "emf_delete_not_selected");
4736 dump_emf_records(hemf, "emf_delete_not_selected");
4737 }
4738 ret = DeleteEnhMetaFile(hemf);
4739 ok(ret, "DeleteEnhMetaFile(%p) error %ld\n", hemf, GetLastError());
4740
4741 hemf = CloseEnhMetaFile(hdc2);
4742 ok(hemf != 0, "CloseEnhMetaFile failed\n");
4743 if (compare_emf_bits(hemf, delete_selected_bits, sizeof(delete_selected_bits),
4744 "emf_delete_selected", FALSE))
4745 {
4746 dump_emf_bits(hemf, "emf_delete_selected");
4747 dump_emf_records(hemf, "emf_delete_selected");
4748 }
4749 ret = DeleteEnhMetaFile(hemf);
4750 ok(ret, "DeleteEnhMetaFile(%p) error %ld\n", hemf, GetLastError());
4751}
4752
4753static const PALETTEENTRY logpalettedata[8] = {
4754 { 0x10, 0x20, 0x30, PC_NOCOLLAPSE },
4755 { 0x20, 0x30, 0x40, PC_NOCOLLAPSE },
4756 { 0x30, 0x40, 0x50, PC_NOCOLLAPSE },
4757 { 0x40, 0x50, 0x60, PC_NOCOLLAPSE },
4758 { 0x50, 0x60, 0x70, PC_NOCOLLAPSE },
4759 { 0x60, 0x70, 0x80, PC_NOCOLLAPSE },
4760 { 0x70, 0x80, 0x90, PC_NOCOLLAPSE },
4761 { 0x80, 0x90, 0xA0, PC_NOCOLLAPSE },
4762};
4763
4764static void test_mf_palette(void)
4765{
4766 char logpalettebuf[sizeof(LOGPALETTE) + sizeof(logpalettedata)];
4767 LOGPALETTE *logpalette = (PLOGPALETTE)logpalettebuf;
4768 HPALETTE hpal, old_pal;
4769 HMETAFILE hmf;
4770 HDC hdc;
4771 BOOL ret;
4772
4773 static const unsigned char palette_bits[] =
4774 {
4775 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x5c, 0x00,
4776 0x00, 0x00, 0x02, 0x00, 0x2d, 0x00, 0x00, 0x00,
4777 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0xf7, 0x00,
4778 0x00, 0x03, 0x08, 0x00, 0x10, 0x20, 0x30, 0x04,
4779 0x20, 0x30, 0x40, 0x04, 0x30, 0x40, 0x50, 0x04,
4780 0x40, 0x50, 0x60, 0x04, 0x50, 0x60, 0x70, 0x04,
4781 0x60, 0x70, 0x80, 0x04, 0x70, 0x80, 0x90, 0x04,
4782 0x80, 0x90, 0xa0, 0x04, 0x04, 0x00, 0x00, 0x00,
4783 0x34, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
4784 0x35, 0x00, 0x2d, 0x00, 0x00, 0x00, 0xf7, 0x00,
4785 0x00, 0x03, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
4786 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
4787 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
4788 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00,
4789 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0xdc, 0xc0, 0x00,
4790 0xa6, 0xca, 0xf0, 0x00, 0xff, 0xfb, 0xf0, 0x00,
4791 0xa0, 0xa0, 0xa4, 0x00, 0x80, 0x80, 0x80, 0x00,
4792 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
4793 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
4794 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00,
4795 0xff, 0xff, 0xff, 0x00, 0x04, 0x00, 0x00, 0x00,
4796 0x34, 0x02, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00,
4797 0x35, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
4798 };
4799
4801 ok( hdc != 0, "CreateMetaFileA failed\n" );
4802
4803 /* Initialize the logical palette with a few colours */
4804 logpalette->palVersion = 0x300;
4806 memcpy( logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata) );
4807 hpal = CreatePalette( logpalette );
4808 old_pal = SelectPalette( hdc, hpal, FALSE );
4809 ok(old_pal == ULongToHandle(TRUE), "old_pal=%p\n", old_pal);
4810
4812 ok(ret, "RealizePalette failed\n");
4813
4815 ok(old_pal == ULongToHandle(TRUE), "old_pal=%p\n", old_pal);
4816
4818 ok(ret, "RealizePalette failed\n");
4819
4820 hmf = CloseMetaFile(hdc);
4821 ok( hmf != 0, "CloseMetaFile failed\n" );
4822
4823 if (compare_mf_bits(hmf, palette_bits, sizeof(palette_bits), "mf_palette"))
4824 {
4825 dump_mf_bits(hmf, "mf_palette");
4826 EnumMetaFile(0, hmf, mf_enum_proc, 0);
4827 }
4828
4829 ret = DeleteMetaFile(hmf);
4830 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
4831}
4832
4833static void test_emf_palette(void)
4834{
4835 char logpalettebuf[sizeof(LOGPALETTE) + sizeof(logpalettedata)];
4836 LOGPALETTE *logpalette = (PLOGPALETTE)logpalettebuf;
4837 HPALETTE hpal, old_pal, def_pal;
4838 HENHMETAFILE emf;
4839 HDC hdc;
4840 BOOL ret;
4841
4842 static const unsigned char palette_bits[] =
4843 {
4844 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
4845 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4846 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
4847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4848 0xe6, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff,
4849 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
4850 0xf0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
4851 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4852 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
4853 0x80, 0x07, 0x00, 0x00, 0xcd, 0x03, 0x00, 0x00,
4854 0xfc, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
4855 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4856 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
4857 0x9f, 0xed, 0x03, 0x00, 0x31, 0x00, 0x00, 0x00,
4858 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4859 0x00, 0x03, 0x08, 0x00, 0x10, 0x20, 0x30, 0x00,
4860 0x20, 0x30, 0x40, 0x00, 0x30, 0x40, 0x50, 0x00,
4861 0x40, 0x50, 0x60, 0x00, 0x50, 0x60, 0x70, 0x00,
4862 0x60, 0x70, 0x80, 0x00, 0x70, 0x80, 0x90, 0x00,
4863 0x80, 0x90, 0xa0, 0x00, 0x30, 0x00, 0x00, 0x00,
4864 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4865 0x34, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
4866 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
4867 0x0f, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x00,
4868 0x34, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
4869 0x10, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00,
4870 0x20, 0x30, 0x40, 0x00, 0x30, 0x40, 0x50, 0x00,
4871 0x40, 0x50, 0x60, 0x00, 0x50, 0x60, 0x70, 0x00,
4872 0x60, 0x70, 0x80, 0x00, 0x70, 0x80, 0x90, 0x00,
4873 0x80, 0x90, 0xa0, 0x00, 0x34, 0x00, 0x00, 0x00
4874 };
4875
4877 ok(hdc != 0, "CreateMetaFileA error %ld\n", GetLastError());
4878
4879 /* Initialize the logical palette with a few colours */
4880 logpalette->palVersion = 0x300;
4882 memcpy(logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata));
4883 hpal = CreatePalette(logpalette);
4884 old_pal = SelectPalette(hdc, hpal, FALSE);
4886 ok(old_pal == def_pal, "old_pal=%p, expected %p\n", old_pal, def_pal);
4887
4889 ok(!ret, "RealizePalette returned %d\n", ret);
4890
4892 ok(old_pal == hpal, "old_pal=%p, expected %p\n", old_pal, hpal);
4893
4895 ok(!ret, "RealizePalette returned %d\n", ret);
4896
4898 ok(emf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
4899
4900 if (compare_emf_bits(emf, palette_bits, sizeof(palette_bits), "emf_palette", FALSE))
4901 {
4902 dump_emf_bits(emf, "emf_palette");
4903 dump_emf_records(emf, "emf_palette");
4904 }
4905
4907 ok(ret, "DeleteMetaFile error %ld\n", GetLastError());
4908}
4909
4910static void test_mf_blit(void)
4911{
4912 BITMAPINFO bmi = {{ sizeof(bmi) }};
4913 HMETAFILE hmf;
4914 HBITMAP bitmap, old_bitmap;
4915 void *bits;
4916 HDC hdc, dib_hdc;
4917 unsigned int i;
4918 BOOL ret;
4919
4920 static const unsigned char blit_bits[] =
4921 {
4922 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0xdf, 0x00,
4923 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00,
4924 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1d, 0x06,
4925 0x21, 0x00, 0xf0, 0x00, 0x05, 0x00, 0x04, 0x00,
4926 0x03, 0x00, 0x02, 0x00, 0x33, 0x00, 0x00, 0x00,
4927 0x41, 0x0b, 0x20, 0x00, 0xcc, 0x00, 0x03, 0x00,
4928 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
4929 0x04, 0x00, 0x02, 0x00, 0x01, 0x00, 0x28, 0x00,
4930 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00,
4931 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,
4932 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
4933 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4934 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b,
4935 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13,
4936 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
4937 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
4938 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
4939 0x2c, 0x2d, 0x33, 0x00, 0x00, 0x00, 0x41, 0x0b,
4940 0x21, 0x00, 0xf0, 0x00, 0x03, 0x00, 0x02, 0x00,
4941 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x04, 0x00,
4942 0x02, 0x00, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00,
4943 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
4944 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
4945 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4946 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4947 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d,
4948 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
4949 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
4950 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
4951 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
4952 0x33, 0x00, 0x00, 0x00, 0x41, 0x0b, 0x20, 0x00,
4953 0xcc, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00,
4954 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00,
4955 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00,
4956 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00,
4957 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00,
4958 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4960 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
4961 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
4962 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
4963 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
4964 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x31, 0x00,
4965 0x00, 0x00, 0x40, 0x09, 0x20, 0x00, 0xcc, 0x00,
4966 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00,
4967 0x02, 0x00, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00,
4968 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
4969 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
4970 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4972 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d,
4973 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
4974 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
4975 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
4976 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
4977 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
4978 };
4979
4981 ok(hdc != 0, "CreateMetaFileA failed\n");
4982
4983 ret = PatBlt(hdc, 2, 3, 4, 5, PATCOPY);
4984 ok(ret, "PatBlt failed\n");
4985
4986 dib_hdc = CreateCompatibleDC(NULL);
4987 ok(!!dib_hdc, "CreateCompatibleDC failed\n");
4988
4989 bmi.bmiHeader.biHeight = 3;
4990 bmi.bmiHeader.biWidth = 4;
4991 bmi.bmiHeader.biBitCount = 24;
4992 bmi.bmiHeader.biPlanes = 1;
4994 bitmap = CreateDIBSection(dib_hdc, &bmi, DIB_RGB_COLORS, &bits, NULL, 0);
4995 ok(!!bitmap, "CreateDIBSection failed, error %ld\n", GetLastError());
4996 for (i = 0; i < bmi.bmiHeader.biHeight * bmi.bmiHeader.biWidth * 3; i++)
4997 ((BYTE *)bits)[i] = i + 10;
4998
4999 old_bitmap = SelectObject(dib_hdc, bitmap);
5000 ok(!!old_bitmap, "SelectObject failed\n");
5001
5002 ret = StretchBlt(hdc, 1, 2, 4, 6, dib_hdc, 0, 0, 2, 3, SRCCOPY);
5003 ok(ret, "StretchBlt failed\n");
5004
5005 /* PATCOPY is recorded as StretchBlt */
5006 ret = StretchBlt(hdc, 1, 2, 4, 6, dib_hdc, 0, 0, 2, 3, PATCOPY);
5007 ok(ret, "StretchBlt failed\n");
5008
5009 /* same src and dst size, recorded as StretchBlt */
5010 ret = StretchBlt(hdc, 1, 2, 2, 3, dib_hdc, 0, 0, 2, 3, SRCCOPY);
5011 ok(ret, "StretchBlt failed\n");
5012
5013 ret = BitBlt(hdc, 1, 2, 2, 3, dib_hdc, 0, 0, SRCCOPY);
5014 ok(ret, "BitBlt failed\n");
5015
5016 DeleteDC(dib_hdc);
5018
5019 hmf = CloseMetaFile(hdc);
5020 ok(hmf != 0, "CloseMetaFile failed\n");
5021
5022 if (compare_mf_bits(hmf, blit_bits, sizeof(blit_bits), "mf_blit"))
5023 {
5024 dump_mf_bits(hmf, "mf_blit");
5025 EnumMetaFile(0, hmf, mf_enum_proc, 0);
5026 }
5027
5028 ret = DeleteMetaFile(hmf);
5029 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
5030}
5031
5032static void test_emf_blit(void)
5033{
5034 BITMAPINFO bmi = {{ sizeof(bmi) }};
5035 HENHMETAFILE hmf;
5036 HBITMAP bitmap, old_bitmap;
5037 void *bits;
5038 HDC hdc, dib_hdc;
5039 unsigned int i;
5040 BOOL ret;
5041
5043 ok(hdc != 0, "CreateMetaFileA failed\n");
5044
5045 ret = PatBlt(hdc, 2, 3, 4, 5, PATCOPY);
5046 ok(ret, "PatBlt failed\n");
5047
5048 dib_hdc = CreateCompatibleDC(NULL);
5049 ok(!!dib_hdc, "CreateCompatibleDC failed\n");
5050
5051 bmi.bmiHeader.biHeight = 3;
5052 bmi.bmiHeader.biWidth = 4;
5053 bmi.bmiHeader.biBitCount = 24;
5054 bmi.bmiHeader.biPlanes = 1;
5056 bitmap = CreateDIBSection(dib_hdc, &bmi, DIB_RGB_COLORS, &bits, NULL, 0);
5057 ok(!!bitmap, "CreateDIBSection failed, error %ld\n", GetLastError());
5058 for (i = 0; i < bmi.bmiHeader.biHeight * bmi.bmiHeader.biWidth * 3; i++)
5059 ((BYTE *)bits)[i] = i + 10;
5060
5061 old_bitmap = SelectObject(dib_hdc, bitmap);
5062 ok(!!old_bitmap, "SelectObject failed\n");
5063
5064 ret = StretchBlt(hdc, 1, 2, 4, 6, dib_hdc, 0, 0, 2, 3, SRCCOPY);
5065 ok(ret, "StretchBlt failed\n");
5066
5067 /* PATCOPY is recorded as PatBlt */
5068 ret = StretchBlt(hdc, 1, 2, 4, 6, dib_hdc, 0, 0, 2, 3, PATCOPY);
5069 ok(ret, "StretchBlt failed\n");
5070
5071 /* same src and dst size, still recorded as StretchBlt */
5072 ret = StretchBlt(hdc, 1, 2, 2, 3, dib_hdc, 0, 0, 2, 3, SRCCOPY);
5073 ok(ret, "StretchBlt failed\n");
5074
5075 ret = BitBlt(hdc, 1, 2, 2, 3, dib_hdc, 0, 0, SRCCOPY);
5076 ok(ret, "BitBlt failed\n");
5077
5078 ret = GdiTransparentBlt(hdc, 1, 2, 2, 3, dib_hdc, 0, 0, 2, 3, RGB(10,20,30));
5079 ok(ret, "GdiTransparentBlt failed\n");
5080
5081 DeleteDC(dib_hdc);
5083
5084 hmf = CloseEnhMetaFile(hdc);
5085 ok(hmf != 0, "CloseMetaFile failed\n");
5086
5087 if (compare_emf_bits(hmf, emf_blit_bits, sizeof(emf_blit_bits), "emf_blit", FALSE) != 0)
5088 {
5089 dump_emf_bits(hmf, "emf_blit");
5090 dump_emf_records(hmf, "emf_blit");
5091 }
5092
5093 ret = DeleteEnhMetaFile(hmf);
5094 ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError());
5095}
5096
5098{
5099 int pos;
5101};
5102
5104 METARECORD *rec, int n, LPARAM ctx)
5105{
5106 struct check_mf_arg *records = (struct check_mf_arg *)ctx;
5107
5108 ok(rec->rdFunction == records->records[records->pos], "got record %x, expected %x\n",
5109 rec->rdFunction, records->records[records->pos]);
5110 return rec->rdFunction == records->records[records->pos++];
5111}
5112
5113static void test_PlayMetaFile(void)
5114{
5115 static WORD line_records[] = { META_LINETO, 0 };
5116 struct check_mf_arg records;
5117 HMETAFILE hmeta;
5118 HDC dc, metadc;
5119 BOOL r;
5120
5122 ok(dc != NULL, "CreateCompatibleDC failed\n");
5123
5125 ok(metadc != NULL, "CreateMetaFile failed\n");
5126 r = LineTo(metadc, 10, 10);
5127 ok(r, "LineTo failed\n");
5128 hmeta = CloseMetaFile(metadc);
5129 ok(hmeta != NULL, "CloseMetaFile failed\n");
5130
5131 records.pos = 0;
5132 records.records = line_records;
5134 ok(r, "EnumMetaFile failed\n");
5135
5137 ok(metadc != NULL, "CreateMetaFile failed\n");
5138 r = PlayMetaFile(metadc, hmeta);
5139 ok(r, "PlayMetaFile failed\n");
5140 r = DeleteMetaFile(hmeta);
5141 ok(r, "DeleteMetaFile failed\n");
5142 hmeta = CloseMetaFile(metadc);
5143 ok(hmeta != NULL, "CloseMetaFile failed\n");
5144
5145 records.pos = 0;
5146 records.records = line_records;
5148 ok(r, "EnumMetaFile failed\n");
5149
5150 r = DeleteMetaFile(hmeta);
5151 ok(r, "DeleteMetaFile failed\n");
5152 r = DeleteDC(dc);
5153 ok(r, "DeleteDC failed\n");
5154}
5155
5156static void test_emf_mask_blit(void)
5157{
5158 BITMAPINFO bmi = {{ sizeof(bmi) }};
5159 HBITMAP bitmap, mask_bitmap;
5160 HENHMETAFILE emf;
5161 HDC hdc, dib_hdc;
5162 unsigned int i;
5163 void *bits;
5164 BOOL ret;
5165
5166 static const POINT plg_points[] = { { 2, 1 }, { 1, 1 }, { 1, 2 } };
5167
5169 ok(hdc != 0, "CreateMetaFileA failed\n");
5170
5171 dib_hdc = CreateCompatibleDC(NULL);
5172 ok(!!dib_hdc, "CreateCompatibleDC failed\n");
5173
5174 bmi.bmiHeader.biHeight = 3;
5175 bmi.bmiHeader.biWidth = 4;
5176 bmi.bmiHeader.biBitCount = 24;
5177 bmi.bmiHeader.biPlanes = 1;
5179 bitmap = CreateDIBSection(dib_hdc, &bmi, DIB_RGB_COLORS, &bits, NULL, 0);
5180 ok(!!bitmap, "CreateDIBSection failed, error %ld\n", GetLastError());
5181 for (i = 0; i < bmi.bmiHeader.biHeight * bmi.bmiHeader.biWidth * 3; i++)
5182 ((BYTE *)bits)[i] = i + 10;
5183
5184 bmi.bmiHeader.biHeight = 3;
5185 bmi.bmiHeader.biWidth = 4;
5186 bmi.bmiHeader.biBitCount = 1;
5187 bmi.bmiHeader.biPlanes = 1;
5189 mask_bitmap = CreateDIBSection(dib_hdc, &bmi, DIB_RGB_COLORS, &bits, NULL, 0);
5190 ok(!!mask_bitmap, "CreateDIBSection failed, error %ld\n", GetLastError());
5191 memset(bits, ~0, bmi.bmiHeader.biHeight * 4);
5192
5193 SelectObject(dib_hdc, bitmap);
5194
5195 ret = MaskBlt(hdc, 0, 0, 3, 4, dib_hdc, 0, 0, mask_bitmap, 0, 0, SRCCOPY);
5196 ok(ret, "MaskBlt failed\n");
5197
5198 ret = MaskBlt(hdc, 0, 0, 3, 4, dib_hdc, 0, 0, NULL, 0, 0, SRCCOPY);
5199 ok(ret, "MaskBlt failed\n");
5200
5201 ret = PlgBlt(hdc, plg_points, dib_hdc, 0, 0, 3, 4, mask_bitmap, 0, 0);
5202 ok(ret, "PlgBlt failed\n");
5203
5204 DeleteDC(dib_hdc);
5206 DeleteObject(mask_bitmap);
5207
5209 ok(emf != 0, "CloseMetaFile failed\n");
5210
5212 "emf_mask_blit", FALSE) != 0)
5213 {
5214 dump_emf_bits(emf, "emf_mask_blit");
5215 dump_emf_records(emf, "emf_mask_blit");
5216 }
5217
5219 ok(ret, "DeleteMetaFile(%p) error %ld\n", emf, GetLastError());
5220}
5221
5222static const unsigned char EMF_STRETCHDIBITS_1BIT_3X3_NOSIZE[] =
5223{
5224 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5226 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5228 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5229 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5230 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5231 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5233 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5234 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5236 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5237 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5238 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5239 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5240 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5242 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5243 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5244 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5245 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5246 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5247 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5248 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5249 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
5250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5251 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5252 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5253 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5255 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5256 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5257 0x14, 0x00, 0x00, 0x00
5258};
5259
5260static const unsigned char EMF_STRETCHDIBITS_1BIT_3X3_SIZED[] =
5261{
5262 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5264 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5265 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5266 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5267 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5268 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5269 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5271 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5272 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5273 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5274 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5275 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5276 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5277 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5278 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5279 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5280 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5281 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5282 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5283 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5284 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5285 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5286 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5287 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
5288 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5289 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5290 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5291 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5293 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5294 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5295 0x14, 0x00, 0x00, 0x00
5296};
5297
5298static const unsigned char EMF_STRETCHDIBITS_4BIT_3X3_NOSIZE[] =
5299{
5300 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5302 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5304 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5305 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5306 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5307 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5308 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5309 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5310 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5311 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5312 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5313 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5314 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5315 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5316 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5317 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5318 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5319 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5320 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5321 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5322 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5323 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5324 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5325 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
5326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5327 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5328 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5331 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5332 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5333 0x14, 0x00, 0x00, 0x00
5334};
5335
5336static const unsigned char EMF_STRETCHDIBITS_4BIT_3X3_SIZED[] =
5337{
5338 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5340 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5341 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5342 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5343 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5344 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5345 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5346 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5347 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5348 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5349 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5350 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5351 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5352 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5353 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5354 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5356 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5357 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5358 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5359 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5360 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5361 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5362 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5363 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
5364 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5365 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5366 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5367 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5368 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5369 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5370 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5371 0x14, 0x00, 0x00, 0x00
5372};
5373
5374static const unsigned char EMF_STRETCHDIBITS_8BIT_3X3_NOSIZE[] =
5375{
5376 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5377 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5378 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5379 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5380 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5381 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5382 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5383 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5384 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5385 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5386 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5387 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5388 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5389 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5390 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5391 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5392 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5393 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5394 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5395 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5396 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5397 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5398 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5399 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5400 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5401 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
5402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5403 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5404 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5406 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5407 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5408 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5409 0x14, 0x00, 0x00, 0x00
5410};
5411
5412static const unsigned char EMF_STRETCHDIBITS_8BIT_3X3_SIZED[] =
5413{
5414 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5416 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5418 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5419 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5420 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5421 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5423 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5424 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5426 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5427 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5428 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5429 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5430 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5431 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5432 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5433 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5434 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5435 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5436 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5437 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5438 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5439 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
5440 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5441 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5442 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5445 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5446 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5447 0x14, 0x00, 0x00, 0x00
5448};
5449
5450static const unsigned char EMF_STRETCHDIBITS_16BIT_555_3X3_NOSIZE[] =
5451{
5452 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5453 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5454 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5455 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5456 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5457 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5458 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5459 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5460 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5461 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5462 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5464 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5465 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5466 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5467 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5468 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5469 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5470 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5471 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5472 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
5473 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5474 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5475 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5476 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5477 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
5478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5481 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5483 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5484 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
5485 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5486 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
5487};
5488
5489static const unsigned char EMF_STRETCHDIBITS_16BIT_555_3X3_SIZED[] =
5490{
5491 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5492 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5493 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5494 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5495 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5496 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5497 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5498 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5500 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5501 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5502 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5503 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5504 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5505 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5506 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5507 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5508 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5509 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5510 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5511 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
5512 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5513 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5514 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5515 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5516 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
5517 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5518 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5519 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5520 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5521 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5522 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5523 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
5524 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5525 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
5526};
5527
5528static const unsigned char EMF_STRETCHDIBITS_24BIT_3X3_NOSIZE[] =
5529{
5530 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5532 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5534 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5535 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5536 0x28, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5537 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5538 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5539 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5540 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5542 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5543 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5544 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5545 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5546 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5547 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5548 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5549 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5550 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
5551 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5552 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5553 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5554 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5555 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
5556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5557 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5558 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5559 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5560 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5561 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5562 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5563 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5564 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
5565 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5566 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
5567};
5568
5569static const unsigned char EMF_STRETCHDIBITS_24BIT_3X3_SIZED[] =
5570{
5571 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5572 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5573 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5575 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5576 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5577 0x28, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5578 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5579 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5580 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5581 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5582 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5583 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5584 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5585 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5586 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5587 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5588 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5589 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5590 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5591 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
5592 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5593 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5594 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5595 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5596 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
5597 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5598 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5600 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5601 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5604 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5605 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
5606 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5607 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
5608};
5609
5610static const unsigned char EMF_STRETCHDIBITS_32BIT_888_3X3_NOSIZE[] =
5611{
5612 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5613 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5614 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5615 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5616 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5617 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5618 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5619 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5621 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5622 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5623 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5624 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5625 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5626 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5627 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5628 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5630 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5631 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5632 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
5633 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5634 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5635 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5636 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5637 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
5638 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5639 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5640 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5641 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5642 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5643 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5644 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5646 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5647 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5648 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
5649 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5650 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
5651};
5652
5653static const unsigned char EMF_STRETCHDIBITS_32BIT_888_3X3_SIZED[] =
5654{
5655 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5656 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5657 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5658 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5659 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5660 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5661 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5662 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5663 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5664 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5665 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5666 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5667 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5668 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5669 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5670 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5671 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5672 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5673 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5674 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5675 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
5676 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5677 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5678 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5679 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5680 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
5681 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5682 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5683 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5684 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5685 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5686 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5687 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5688 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5689 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5690 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5691 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
5692 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5693 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
5694};
5695
5696static const unsigned char EMF_STRETCHDIBITS_16BIT_3X3_NOSIZE[] =
5697{
5698 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5699 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5700 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5701 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5702 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5703 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5704 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5705 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5706 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5707 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5708 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5709 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5710 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5711 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5712 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5713 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5714 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5715 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5716 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5717 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5718 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
5719 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5720 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5721 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5722 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5723 0x01, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
5724 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5725 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5726 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
5727 0xe0, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
5728 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5729 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5730 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5731 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5732 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5733 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5734 0x14, 0x00, 0x00, 0x00
5735};
5736
5737static const unsigned char EMF_STRETCHDIBITS_16BIT_3X3_SIZED[] =
5738{
5739 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5740 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5741 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5743 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5744 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5745 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5746 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5747 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5748 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5749 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5750 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5751 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5752 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5753 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5754 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5755 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5756 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5757 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5758 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5759 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
5760 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5761 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5762 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5763 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5764 0x01, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
5765 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5766 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5767 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
5768 0xe0, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
5769 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5771 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5773 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5774 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5775 0x14, 0x00, 0x00, 0x00
5776};
5777
5778static const unsigned char EMF_STRETCHDIBITS_32BIT_3X3_NOSIZE[] =
5779{
5780 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5782 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5784 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5785 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5786 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5787 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5789 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5790 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5792 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5793 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5794 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5795 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5796 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5798 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5799 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5800 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
5801 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5802 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5803 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5804 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5805 0x01, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
5806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5807 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5808 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
5809 0xe0, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
5810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5811 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5812 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5813 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5814 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5815 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5816 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5817 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5818 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5819 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5820 0x14, 0x00, 0x00, 0x00
5821};
5822
5823static const unsigned char EMF_STRETCHDIBITS_32BIT_3X3_SIZED[] =
5824{
5825 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5826 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5827 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5828 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5829 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5830 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5831 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5832 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5833 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5834 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5835 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5836 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5837 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5838 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5839 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5840 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5841 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5842 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5843 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5844 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5845 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
5846 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5847 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5848 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5849 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5850 0x01, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
5851 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5852 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5853 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
5854 0xe0, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
5855 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5856 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5857 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5858 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5859 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5860 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5861 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5862 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5863 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5864 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5865 0x14, 0x00, 0x00, 0x00
5866};
5867
5868static const unsigned char EMF_STRETCHDIBITS_1BIT_4X4_NOSIZE[] =
5869{
5870 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5871 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5872 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5873 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5874 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5875 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5876 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5877 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5878 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5879 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5880 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5881 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5882 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5883 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5884 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5885 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5886 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5887 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5888 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5889 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5890 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5891 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5892 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5893 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5894 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5895 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
5896 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5897 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5898 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5899 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5900 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5901 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5902 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5903 0x14, 0x00, 0x00, 0x00
5904};
5905
5906static const unsigned char EMF_STRETCHDIBITS_1BIT_4X4_SIZED[] =
5907{
5908 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5909 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5910 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5911 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5912 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5913 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5914 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5915 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5916 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5917 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5918 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5919 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5920 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5921 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5922 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5923 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5924 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5925 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5926 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5927 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5928 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5929 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5930 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5931 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5932 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5933 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
5934 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5935 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5936 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5937 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5938 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5939 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5940 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5941 0x14, 0x00, 0x00, 0x00
5942};
5943
5944static const unsigned char EMF_STRETCHDIBITS_4BIT_4X4_NOSIZE[] =
5945{
5946 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5947 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5948 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5949 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5950 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5951 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5952 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5953 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5955 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5956 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5957 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5958 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5959 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5960 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5961 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5962 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5963 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5964 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5965 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
5966 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
5967 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5968 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
5969 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
5970 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
5971 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
5972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5973 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
5974 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
5975 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5976 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5977 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5978 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
5979 0x14, 0x00, 0x00, 0x00
5980};
5981
5982static const unsigned char EMF_STRETCHDIBITS_4BIT_4X4_SIZED[] =
5983{
5984 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
5985 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5986 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5987 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5988 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
5989 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
5990 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5991 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5993 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
5994 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
5995 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5996 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
5997 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
5998 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5999 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6000 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6001 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6002 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6003 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6004 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
6005 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6006 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6007 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6008 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6009 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
6010 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6011 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
6012 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
6013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6014 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6015 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6016 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6017 0x14, 0x00, 0x00, 0x00
6018};
6019
6020static const unsigned char EMF_STRETCHDIBITS_8BIT_4X4_NOSIZE[] =
6021{
6022 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6023 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6024 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6025 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6026 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6027 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6028 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6029 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6031 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6032 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6033 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6034 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6035 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6036 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6037 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6038 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6039 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6040 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6041 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6042 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
6043 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6044 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6045 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6046 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6047 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
6048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6049 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
6050 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
6051 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6052 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6053 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6054 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6055 0x14, 0x00, 0x00, 0x00
6056};
6057
6058static const unsigned char EMF_STRETCHDIBITS_8BIT_4X4_SIZED[] =
6059{
6060 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6061 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6062 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6063 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6064 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6065 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6066 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6067 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6068 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6069 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6070 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6071 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6072 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6073 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6074 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6075 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6076 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6077 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6078 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6079 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6080 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
6081 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6082 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6083 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6084 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6085 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
6086 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6087 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
6088 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
6089 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6091 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6092 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6093 0x14, 0x00, 0x00, 0x00
6094};
6095
6096static const unsigned char EMF_STRETCHDIBITS_16BIT_555_4X4_NOSIZE[] =
6097{
6098 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6099 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6100 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6102 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6103 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6104 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6105 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6107 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6108 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6110 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6111 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6112 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6113 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6114 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6116 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6117 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6118 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6119 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6120 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6121 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6122 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6123 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
6124 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6125 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6126 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6127 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6129 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6130 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6131 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6132 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6133};
6134
6135static const unsigned char EMF_STRETCHDIBITS_16BIT_555_4X4_SIZED[] =
6136{
6137 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6139 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6141 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6142 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6143 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6144 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6146 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6147 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6148 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6149 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6150 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6151 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6152 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6153 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6155 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6156 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6157 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6158 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6159 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6160 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6161 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6162 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
6163 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6164 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6166 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6169 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6170 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6171 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6172};
6173
6174static const unsigned char EMF_STRETCHDIBITS_24BIT_4X4_NOSIZE[] =
6175{
6176 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6178 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6180 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6181 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6182 0x28, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6183 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6185 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6186 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6188 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6189 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6190 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6191 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6192 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6194 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6195 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6196 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6197 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6198 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6199 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6200 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6201 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
6202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6203 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6204 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6205 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6206 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6207 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6210 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6211 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6212 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6213};
6214
6215static const unsigned char EMF_STRETCHDIBITS_24BIT_4X4_SIZED[] =
6216{
6217 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6219 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6221 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6222 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6223 0x28, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6224 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6226 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6227 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6229 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6230 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6231 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6232 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6233 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6235 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6236 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6237 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6238 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6239 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6240 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6241 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6242 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
6243 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6245 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6247 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6249 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6251 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6252 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6253 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6254};
6255
6256static const unsigned char EMF_STRETCHDIBITS_32BIT_888_4X4_NOSIZE[] =
6257{
6258 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6259 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6260 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6262 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6263 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6264 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6265 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6266 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6267 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6268 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6270 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6271 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6272 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6273 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6274 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6276 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6277 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6278 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6279 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6280 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6281 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6282 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6283 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
6284 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6285 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6286 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6287 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6288 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6289 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6290 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6291 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6293 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6294 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6295 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6296 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6297};
6298
6299static const unsigned char EMF_STRETCHDIBITS_32BIT_888_4X4_SIZED[] =
6300{
6301 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6303 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6305 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6306 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6307 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6308 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6309 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6310 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6311 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6313 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6314 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6315 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6316 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6317 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6318 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6319 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6320 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6321 0x28, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6322 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6323 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6324 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6325 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6326 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
6327 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6331 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6332 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6333 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6334 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6335 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6336 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6337 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6338 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6339 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6340};
6341
6342static const unsigned char EMF_STRETCHDIBITS_16BIT_4X4_NOSIZE[] =
6343{
6344 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6345 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6346 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6347 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6348 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6349 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6350 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6351 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6352 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6353 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6354 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6356 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6357 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6358 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6359 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6360 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6361 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6362 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6363 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6364 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
6365 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6366 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6367 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6368 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6369 0x01, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
6370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6372 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
6373 0xe0, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
6374 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6375 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6376 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6377 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6378 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6379 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6380 0x14, 0x00, 0x00, 0x00
6381};
6382
6383static const unsigned char EMF_STRETCHDIBITS_16BIT_4X4_SIZED[] =
6384{
6385 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6387 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6389 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6390 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6391 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6392 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6393 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6394 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6395 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6396 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6397 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6398 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6399 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6400 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6401 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6403 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6404 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6405 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
6406 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6407 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6408 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6409 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6410 0x01, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
6411 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6413 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
6414 0xe0, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
6415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6418 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6419 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6420 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6421 0x14, 0x00, 0x00, 0x00
6422};
6423
6424static const unsigned char EMF_STRETCHDIBITS_32BIT_4X4_NOSIZE[] =
6425{
6426 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6428 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6429 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6430 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6431 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6432 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6433 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6435 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6436 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6437 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6438 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6439 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6440 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6441 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6442 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6444 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6445 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6446 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
6447 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6448 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6449 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6450 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6451 0x01, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
6452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6453 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
6455 0xe0, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
6456 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6457 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6458 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6459 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6460 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6461 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6464 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6465 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6466 0x14, 0x00, 0x00, 0x00
6467};
6468
6469static const unsigned char EMF_STRETCHDIBITS_32BIT_4X4_SIZED[] =
6470{
6471 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6472 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6473 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6474 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6475 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
6476 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6477 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6478 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6480 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6481 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6483 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6484 0xc0, 0x19, 0x03, 0x00, 0x51, 0x00, 0x00, 0x00,
6485 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6486 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6487 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6488 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6489 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6490 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
6491 0x34, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
6492 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6493 0x20, 0x00, 0xcc, 0x00, 0x04, 0x00, 0x00, 0x00,
6494 0x04, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
6495 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6496 0x01, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
6497 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6498 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
6500 0xe0, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
6501 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6502 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6503 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6504 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6505 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6506 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6507 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6508 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6509 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6510 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6511 0x14, 0x00, 0x00, 0x00
6512};
6513
6514static void test_emf_StretchDIBits(void)
6515{
6516 static const unsigned char dib_bits[4 * 4 * 4] = { 0 };
6517 static const int bitmap_width = 4, bitmap_height = 4;
6518 union {
6519#ifdef __REACTOS__
6520 unsigned char b[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)];
6521#else
6522 unsigned char b[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
6523#endif
6524 BITMAPINFO i;
6526 } bmi;
6527 HDC hdc, hdc_emf;
6528 HENHMETAFILE hemf;
6529 int ret, test_idx, color_idx;
6530
6531 static const struct
6532 {
6533 WORD bpp;
6534 int src_width;
6535 int src_height;
6537 unsigned char infomode;
6538 const void *bits;
6539 size_t bits_count;
6540 DWORD used_color_count;
6541 DWORD color_count;
6542 RGBQUAD colors[3];
6543 }
6544 tests[] =
6545 {
6546 {1, 3, 3, BI_RGB, 0, EMF_STRETCHDIBITS_1BIT_3X3_NOSIZE, sizeof(EMF_STRETCHDIBITS_1BIT_3X3_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
6547 {1, 3, 3, BI_RGB, 1, EMF_STRETCHDIBITS_1BIT_3X3_SIZED, sizeof(EMF_STRETCHDIBITS_1BIT_3X3_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
6548 {4, 3, 3, BI_RGB, 0, EMF_STRETCHDIBITS_4BIT_3X3_NOSIZE, sizeof(EMF_STRETCHDIBITS_4BIT_3X3_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
6549 {4, 3, 3, BI_RGB, 1, EMF_STRETCHDIBITS_4BIT_3X3_SIZED, sizeof(EMF_STRETCHDIBITS_4BIT_3X3_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
6550 {8, 3, 3, BI_RGB, 0, EMF_STRETCHDIBITS_8BIT_3X3_NOSIZE, sizeof(EMF_STRETCHDIBITS_8BIT_3X3_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
6551 {8, 3, 3, BI_RGB, 1, EMF_STRETCHDIBITS_8BIT_3X3_SIZED, sizeof(EMF_STRETCHDIBITS_8BIT_3X3_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
6559 {16, 3, 3, BI_BITFIELDS, 0, EMF_STRETCHDIBITS_16BIT_3X3_NOSIZE, sizeof(EMF_STRETCHDIBITS_16BIT_3X3_NOSIZE), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
6560 {16, 3, 3, BI_BITFIELDS, 1, EMF_STRETCHDIBITS_16BIT_3X3_SIZED, sizeof(EMF_STRETCHDIBITS_16BIT_3X3_SIZED), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
6561 {32, 3, 3, BI_BITFIELDS, 0, EMF_STRETCHDIBITS_32BIT_3X3_NOSIZE, sizeof(EMF_STRETCHDIBITS_32BIT_3X3_NOSIZE), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
6562 {32, 3, 3, BI_BITFIELDS, 1, EMF_STRETCHDIBITS_32BIT_3X3_SIZED, sizeof(EMF_STRETCHDIBITS_32BIT_3X3_SIZED), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
6563 {1, 4, 4, BI_RGB, 0, EMF_STRETCHDIBITS_1BIT_4X4_NOSIZE, sizeof(EMF_STRETCHDIBITS_1BIT_4X4_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
6564 {1, 4, 4, BI_RGB, 1, EMF_STRETCHDIBITS_1BIT_4X4_SIZED, sizeof(EMF_STRETCHDIBITS_1BIT_4X4_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
6565 {4, 4, 4, BI_RGB, 0, EMF_STRETCHDIBITS_4BIT_4X4_NOSIZE, sizeof(EMF_STRETCHDIBITS_4BIT_4X4_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
6566 {4, 4, 4, BI_RGB, 1, EMF_STRETCHDIBITS_4BIT_4X4_SIZED, sizeof(EMF_STRETCHDIBITS_4BIT_4X4_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
6567 {8, 4, 4, BI_RGB, 0, EMF_STRETCHDIBITS_8BIT_4X4_NOSIZE, sizeof(EMF_STRETCHDIBITS_8BIT_4X4_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
6568 {8, 4, 4, BI_RGB, 1, EMF_STRETCHDIBITS_8BIT_4X4_SIZED, sizeof(EMF_STRETCHDIBITS_8BIT_4X4_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
6576 {16, 4, 4, BI_BITFIELDS, 0, EMF_STRETCHDIBITS_16BIT_4X4_NOSIZE, sizeof(EMF_STRETCHDIBITS_16BIT_4X4_NOSIZE), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
6577 {16, 4, 4, BI_BITFIELDS, 1, EMF_STRETCHDIBITS_16BIT_4X4_SIZED, sizeof(EMF_STRETCHDIBITS_16BIT_4X4_SIZED), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
6578 {32, 4, 4, BI_BITFIELDS, 0, EMF_STRETCHDIBITS_32BIT_4X4_NOSIZE, sizeof(EMF_STRETCHDIBITS_32BIT_4X4_NOSIZE), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
6579 {32, 4, 4, BI_BITFIELDS, 1, EMF_STRETCHDIBITS_32BIT_4X4_SIZED, sizeof(EMF_STRETCHDIBITS_32BIT_4X4_SIZED), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
6580 };
6581
6582 hdc = GetDC(0);
6583
6584 for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx)
6585 {
6586 winetest_push_context("Test %d", test_idx);
6587
6588 memset(&bmi, 0, sizeof(bmi));
6589 if (tests[test_idx].infomode < 2)
6590 {
6591 bmi.i.bmiHeader.biSize = sizeof(bmi.i.bmiHeader);
6592 bmi.i.bmiHeader.biWidth = bitmap_width;
6593 bmi.i.bmiHeader.biHeight = bitmap_height;
6594 bmi.i.bmiHeader.biBitCount = tests[test_idx].bpp;
6595 bmi.i.bmiHeader.biPlanes = 1;
6596 bmi.i.bmiHeader.biCompression = tests[test_idx].compression;
6597 bmi.i.bmiHeader.biClrUsed = tests[test_idx].used_color_count;
6598 if (tests[test_idx].infomode == 1)
6599 bmi.i.bmiHeader.biSizeImage = (((bitmap_width * tests[test_idx].bpp + 31) >> 3) & ~3) * bitmap_height;
6600 memcpy(bmi.i.bmiColors, tests[test_idx].colors, sizeof(RGBQUAD) * tests[test_idx].color_count);
6601 }
6602 else
6603 {
6604 bmi.c.bmciHeader.bcSize = sizeof(bmi.c.bmciHeader);
6605 bmi.c.bmciHeader.bcWidth = bitmap_width;
6606 bmi.c.bmciHeader.bcHeight = bitmap_height;
6607 bmi.c.bmciHeader.bcPlanes = 1;
6608 bmi.c.bmciHeader.bcBitCount = tests[test_idx].bpp;
6609 for (color_idx = 0; color_idx < tests[test_idx].color_count; color_idx++)
6610 {
6611 bmi.c.bmciColors[color_idx].rgbtBlue = tests[test_idx].colors[color_idx].rgbBlue;
6612 bmi.c.bmciColors[color_idx].rgbtGreen = tests[test_idx].colors[color_idx].rgbGreen;
6613 bmi.c.bmciColors[color_idx].rgbtRed = tests[test_idx].colors[color_idx].rgbRed;
6614 }
6615 }
6616
6617 hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
6618 ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
6619
6620 ret = StretchDIBits(hdc_emf, 0, 0, bitmap_width, bitmap_height, 0, 0,
6621 tests[test_idx].src_width, tests[test_idx].src_height,
6622 dib_bits, &bmi.i, DIB_RGB_COLORS, SRCCOPY);
6623 ok(ret == bitmap_height, "expected StretchDIBits to return %d, got %d (lasterr %lu)\n", bitmap_height, ret, GetLastError());
6624
6625 hemf = CloseEnhMetaFile(hdc_emf);
6626 ok(!!hemf, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
6627
6628 ret = compare_emf_bits(hemf, tests[test_idx].bits, tests[test_idx].bits_count,
6629 "test_emf_StretchDIBits", FALSE);
6630 if (ret)
6631 {
6632 dump_emf_bits(hemf, "test_emf_StretchDIBits");
6633 dump_emf_records(hemf, "test_emf_StretchDIBits");
6634 }
6635
6636 DeleteEnhMetaFile(hemf);
6637
6639 }
6640
6641 ReleaseDC(0, hdc);
6642}
6643
6644static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_3X3_NOSIZE[] =
6645{
6646 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6647 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6648 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6649 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6650 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6651 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6652 0x04, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6653 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6654 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6655 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6656 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6657 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6658 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6659 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6660 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6661 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6662 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6663 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6664 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6665 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6666 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6667 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6668 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6669 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6670 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
6671 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6672 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6673 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6674 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
6675 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6676 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6677 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6678 0x14, 0x00, 0x00, 0x00
6679};
6680
6681static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_3X3_SIZED[] =
6682{
6683 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6684 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6685 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6686 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6687 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6688 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6689 0x04, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6690 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6691 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6692 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6693 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6694 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6695 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6696 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6697 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6698 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6699 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6700 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6701 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6702 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6703 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6704 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6705 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6706 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6707 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
6708 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6709 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6710 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6711 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
6712 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6713 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6714 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6715 0x14, 0x00, 0x00, 0x00
6716};
6717
6718static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_3X3_NOSIZE[] =
6719{
6720 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6721 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6722 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6723 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6724 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6725 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6726 0x04, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6727 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6728 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6729 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6730 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6731 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6732 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6733 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6734 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6735 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6736 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6737 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6738 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6739 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6740 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6741 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6742 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6743 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6744 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
6745 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6746 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6747 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6748 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
6749 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6750 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6751 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6752 0x14, 0x00, 0x00, 0x00
6753};
6754
6755static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_3X3_SIZED[] =
6756{
6757 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6758 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6759 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6760 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6761 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6762 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6763 0x04, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6764 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6765 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6766 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6767 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6768 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6769 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6770 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6771 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6772 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6773 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6774 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6775 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6776 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6777 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6778 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6779 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6780 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6781 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
6782 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6784 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6785 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
6786 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6787 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6788 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6789 0x14, 0x00, 0x00, 0x00
6790};
6791
6792static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_3X3_NOSIZE[] =
6793{
6794 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6795 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6796 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6798 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6799 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6800 0x04, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6801 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6803 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6804 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6806 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6807 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6808 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6809 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6810 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6811 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6812 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6813 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6814 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6815 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6816 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6817 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6818 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
6819 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6820 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6821 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6822 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
6823 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6824 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6825 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6826 0x14, 0x00, 0x00, 0x00
6827};
6828
6829static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_3X3_SIZED[] =
6830{
6831 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6832 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6833 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6834 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6835 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6836 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6837 0x04, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6838 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6839 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6840 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6841 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6842 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6843 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6844 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6845 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6846 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6847 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6849 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6850 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6851 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
6852 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6853 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6854 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6855 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
6856 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6857 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6858 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6859 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
6860 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6861 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6862 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6863 0x14, 0x00, 0x00, 0x00
6864};
6865
6867{
6868 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6869 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6870 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6871 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6872 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6873 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6874 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6875 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6876 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6877 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6878 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6879 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6880 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6881 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6882 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6883 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6884 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6885 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6886 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6887 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6888 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
6889 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6890 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6891 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6892 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
6893 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6894 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6895 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6896 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6897 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6898 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6899 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6900 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6901 0x14, 0x00, 0x00, 0x00
6902};
6903
6904static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_555_3X3_SIZED[] =
6905{
6906 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6907 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6908 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6909 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6910 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6911 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6912 0x0c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6913 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6914 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6915 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6916 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6917 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6918 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6919 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6920 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6921 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6922 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6923 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6924 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6925 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6926 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
6927 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6928 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6929 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6930 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
6931 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
6932 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6933 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6934 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6935 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6936 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6937 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6938 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
6939 0x14, 0x00, 0x00, 0x00
6940};
6941
6942static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_3X3_NOSIZE[] =
6943{
6944 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6945 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6946 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6947 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6948 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6949 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6950 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6951 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6952 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6953 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6954 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6955 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6956 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6957 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6958 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6959 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6960 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6961 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6962 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6963 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
6964 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
6965 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6966 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6967 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
6968 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
6969 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6973 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6974 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6975 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6976 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
6977 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6978 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
6979};
6980
6981static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_3X3_SIZED[] =
6982{
6983 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
6984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6985 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6986 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6987 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
6988 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
6989 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6990 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6991 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6992 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
6993 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
6994 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6995 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
6996 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
6997 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6998 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6999 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7000 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7001 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7002 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7003 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7004 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7005 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7006 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7007 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
7008 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
7009 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7010 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7011 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7012 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7014 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7015 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7016 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7017 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7018};
7019
7021{
7022 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7023 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7024 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7025 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7026 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
7027 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7028 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7029 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7031 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7032 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7033 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7034 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7035 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7036 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7037 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7038 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7039 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7040 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7041 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7042 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7043 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7044 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7045 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7046 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7049 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7050 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7051 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7052 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7053 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7054 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7055 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7056 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7057 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7058 0x14, 0x00, 0x00, 0x00
7059};
7060
7061static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_888_3X3_SIZED[] =
7062{
7063 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7064 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7065 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7066 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7067 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
7068 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7069 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7070 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7071 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7072 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7073 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7074 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7075 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7076 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7077 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7078 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7079 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7080 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7081 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7082 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7083 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7084 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7085 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7086 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7087 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7088 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
7089 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7091 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7092 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7093 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7094 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7095 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7096 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7097 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7098 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7099 0x14, 0x00, 0x00, 0x00
7100};
7101
7102static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_3X3_NOSIZE[] =
7103{
7104 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7106 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7108 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
7109 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7110 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7111 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7113 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7114 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7116 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7117 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7118 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7119 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7120 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7122 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7123 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7124 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7125 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7126 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7127 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7128 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
7129 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7130 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7132 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
7133 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7136 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7137 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7138 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7139};
7140
7141static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_3X3_SIZED[] =
7142{
7143 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7145 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7147 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
7148 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7149 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7150 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7152 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7153 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7155 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7156 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7157 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7158 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7159 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7160 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7161 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7162 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7163 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7164 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7165 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7166 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7167 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
7168 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
7169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7171 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
7172 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7175 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7176 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7177 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7178};
7179
7180static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_3X3_NOSIZE[] =
7181{
7182 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7184 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7186 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
7187 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7188 0x30, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7189 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7191 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7192 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7194 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7195 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7196 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7197 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7198 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7200 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7201 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7202 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7203 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7204 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7205 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7206 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7207 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7210 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
7211 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7216 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7217 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7218 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7219 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7220};
7221
7222static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_3X3_SIZED[] =
7223{
7224 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7226 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7228 0x35, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00,
7229 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7230 0x30, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7231 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7233 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7234 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7236 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7237 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7238 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7239 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7240 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7242 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7243 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7244 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7245 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7246 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7247 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7248 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7249 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
7250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7252 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
7253 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7255 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7258 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7259 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7260 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7261 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7262};
7263
7264static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_4X4_NOSIZE[] =
7265{
7266 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7267 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7268 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7270 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7271 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7272 0x08, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7273 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7275 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7276 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7277 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7278 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7279 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7280 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7281 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7282 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7284 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7285 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7286 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
7287 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7288 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7289 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7290 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
7291 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7293 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7294 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
7295 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7296 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7297 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7298 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7299};
7300
7301static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_4X4_SIZED[] =
7302{
7303 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7305 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7306 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7307 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7308 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7309 0x08, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7310 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7311 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7312 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7313 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7314 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7315 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7316 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7317 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7318 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7319 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7320 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7321 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7322 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7323 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
7324 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7325 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7326 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7327 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
7328 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7330 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7331 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
7332 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7333 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7334 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7335 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7336};
7337
7338static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_4X4_NOSIZE[] =
7339{
7340 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7341 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7342 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7343 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7344 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7345 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7346 0x08, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7347 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7349 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7350 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7352 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7353 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7354 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7355 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7356 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7357 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7358 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7359 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7360 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
7361 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7362 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7363 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7364 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
7365 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7366 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7367 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7368 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
7369 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7370 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7371 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7372 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7373};
7374
7375static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_4X4_SIZED[] =
7376{
7377 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7378 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7379 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7380 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7381 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7382 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7383 0x08, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7384 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7385 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7386 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7387 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7389 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7390 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7391 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7392 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7393 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7394 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7395 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7396 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7397 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
7398 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7399 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7400 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7401 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
7402 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7403 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7404 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7405 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
7406 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7407 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7408 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7409 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7410};
7411
7412static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_4X4_NOSIZE[] =
7413{
7414 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7416 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7418 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7419 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7420 0x08, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7421 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7423 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7424 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7426 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7427 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7428 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7429 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7430 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7431 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7432 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7433 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7434 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
7435 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7436 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7437 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7438 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
7439 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7440 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7441 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7442 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
7443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7444 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7445 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7446 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7447};
7448
7449static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_4X4_SIZED[] =
7450{
7451 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7453 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7455 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7456 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7457 0x08, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7458 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7459 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7460 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7461 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7463 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7464 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7465 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7466 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7467 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7468 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7469 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7470 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7471 0x2c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
7472 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7473 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7474 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7475 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
7476 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7477 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7478 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7479 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
7480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7481 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7482 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7483 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7484};
7485
7487{
7488 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7489 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7490 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7491 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7492 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7493 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7494 0x14, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7495 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7496 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7497 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7498 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7500 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7501 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7502 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7503 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7504 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7505 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7506 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7507 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7508 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7509 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7510 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7511 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7512 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
7513 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7514 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7515 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7516 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7517 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7518 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7519 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7520 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7521 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7522 0x14, 0x00, 0x00, 0x00
7523};
7524
7525static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_555_4X4_SIZED[] =
7526{
7527 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7528 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7529 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7530 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7531 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7532 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7533 0x14, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7534 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7535 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7536 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7537 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7538 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7539 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7540 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7541 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7542 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7543 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7544 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7545 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7546 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7547 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7548 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7549 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7550 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7551 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
7552 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
7553 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7554 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7555 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7557 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7558 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7559 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7560 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7561 0x14, 0x00, 0x00, 0x00
7562};
7563
7564static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_4X4_NOSIZE[] =
7565{
7566 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7567 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7568 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7569 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7570 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7571 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7572 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7573 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7575 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7576 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7577 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7578 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7579 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7580 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7581 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7582 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7583 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7584 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7585 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7586 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7587 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7588 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7589 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7590 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
7591 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7592 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7593 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7596 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7597 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7598 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7600 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7601 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7602 0x14, 0x00, 0x00, 0x00
7603};
7604
7605static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_4X4_SIZED[] =
7606{
7607 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7608 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7609 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7610 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7611 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7612 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7613 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7614 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7615 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7616 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7617 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7618 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7619 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7620 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7621 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7622 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7623 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7625 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7626 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7627 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7628 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7629 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7630 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7631 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
7632 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
7633 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7634 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7635 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7636 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7637 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7638 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7639 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7640 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7641 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7642 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7643 0x14, 0x00, 0x00, 0x00
7644};
7645
7647{
7648 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7649 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7650 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7651 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7652 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7653 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7654 0x34, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7655 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7656 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7657 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7658 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7659 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7660 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7661 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7662 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7663 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7664 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7665 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7666 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7667 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7668 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7669 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7670 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7671 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7672 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7673 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7674 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7675 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7676 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7677 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7678 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7679 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7680 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7681 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7682 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7683 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7684 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7685 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7686 0x14, 0x00, 0x00, 0x00
7687};
7688
7689static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_888_4X4_SIZED[] =
7690{
7691 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7692 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7693 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7694 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7695 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7696 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7697 0x34, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7698 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7699 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7700 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7701 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7702 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7703 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7704 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7705 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7706 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7707 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7708 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7709 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7710 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7711 0x28, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
7712 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7713 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7714 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7715 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7716 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
7717 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7718 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7719 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7720 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7721 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7722 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7723 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7724 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7725 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7726 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7727 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
7728 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
7729 0x14, 0x00, 0x00, 0x00
7730};
7731
7732static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_4X4_NOSIZE[] =
7733{
7734 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7735 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7736 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7737 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7738 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7739 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7740 0x20, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7741 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7743 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7744 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7745 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7746 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7747 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7748 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7749 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7750 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7751 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7752 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7753 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7754 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7755 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7756 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7757 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7758 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
7759 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7760 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7761 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7762 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
7763 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7764 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7765 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7766 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7767 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7768 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7769 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7770};
7771
7772static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_4X4_SIZED[] =
7773{
7774 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7775 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7776 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7777 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7778 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7779 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7780 0x20, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7781 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7783 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7784 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7786 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7787 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7788 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7789 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7790 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7792 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7793 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7794 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7795 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7796 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7797 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7798 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
7799 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
7800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7801 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7802 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
7803 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7807 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7808 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7809 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7810};
7811
7812static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_4X4_NOSIZE[] =
7813{
7814 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7815 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7816 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7817 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7818 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7819 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7820 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7821 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7823 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7824 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7825 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7826 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7827 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7828 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7829 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7830 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7831 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7832 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7833 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7834 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7835 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7836 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7837 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7838 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7839 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7840 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7841 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7842 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
7843 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7844 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7845 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7846 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7849 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7850 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7851 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7852 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7853 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7854};
7855
7856static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_4X4_SIZED[] =
7857{
7858 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
7859 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7860 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7861 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7862 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
7863 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
7864 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7865 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7866 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7867 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
7868 0x0f, 0x01, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00,
7869 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7870 0x00, 0x00, 0x00, 0x00, 0x55, 0x22, 0x04, 0x00,
7871 0xc0, 0x19, 0x03, 0x00, 0x50, 0x00, 0x00, 0x00,
7872 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7873 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
7874 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7875 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7876 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7877 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
7878 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7879 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7880 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7881 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
7882 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
7883 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
7884 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7885 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7886 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
7887 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7888 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7889 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7890 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7891 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7892 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7893 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7894 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7895 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
7896 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7897 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
7898};
7899
7901{
7902 static const unsigned char dib_bits[4 * 4 * 4] = { 0 };
7903 static const int bitmap_width = 4, bitmap_height = 4;
7904 union {
7905#ifdef __REACTOS__
7906 unsigned char b[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)];
7907#else
7908 unsigned char b[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
7909#endif
7910 BITMAPINFO i;
7912 } bmi;
7913 HDC hdc, hdc_emf;
7914 HENHMETAFILE hemf;
7915 int ret, test_idx, color_idx;
7916
7917 static const struct
7918 {
7919 WORD bpp;
7920 int width;
7921 int height;
7923 unsigned char infomode;
7924 const void *bits;
7925 size_t bits_count;
7926 DWORD used_color_count;
7927 DWORD color_count;
7928 RGBQUAD colors[3];
7929 }
7930 tests[] =
7931 {
7932 {1, 3, 3, BI_RGB, 0, EMF_SETDIBITSTODEVICE_1BIT_3X3_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_1BIT_3X3_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
7933 {1, 3, 3, BI_RGB, 1, EMF_SETDIBITSTODEVICE_1BIT_3X3_SIZED, sizeof(EMF_SETDIBITSTODEVICE_1BIT_3X3_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
7934 {4, 3, 3, BI_RGB, 0, EMF_SETDIBITSTODEVICE_4BIT_3X3_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_4BIT_3X3_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
7935 {4, 3, 3, BI_RGB, 1, EMF_SETDIBITSTODEVICE_4BIT_3X3_SIZED, sizeof(EMF_SETDIBITSTODEVICE_4BIT_3X3_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
7936 {8, 3, 3, BI_RGB, 0, EMF_SETDIBITSTODEVICE_8BIT_3X3_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_8BIT_3X3_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
7937 {8, 3, 3, BI_RGB, 1, EMF_SETDIBITSTODEVICE_8BIT_3X3_SIZED, sizeof(EMF_SETDIBITSTODEVICE_8BIT_3X3_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
7945 {16, 3, 3, BI_BITFIELDS, 0, EMF_SETDIBITSTODEVICE_16BIT_3X3_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_16BIT_3X3_NOSIZE), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
7946 {16, 3, 3, BI_BITFIELDS, 1, EMF_SETDIBITSTODEVICE_16BIT_3X3_SIZED, sizeof(EMF_SETDIBITSTODEVICE_16BIT_3X3_SIZED), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
7947 {32, 3, 3, BI_BITFIELDS, 0, EMF_SETDIBITSTODEVICE_32BIT_3X3_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_32BIT_3X3_NOSIZE), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
7948 {32, 3, 3, BI_BITFIELDS, 1, EMF_SETDIBITSTODEVICE_32BIT_3X3_SIZED, sizeof(EMF_SETDIBITSTODEVICE_32BIT_3X3_SIZED), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
7949 {1, 4, 4, BI_RGB, 0, EMF_SETDIBITSTODEVICE_1BIT_4X4_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_1BIT_4X4_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
7950 {1, 4, 4, BI_RGB, 1, EMF_SETDIBITSTODEVICE_1BIT_4X4_SIZED, sizeof(EMF_SETDIBITSTODEVICE_1BIT_4X4_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
7951 {4, 4, 4, BI_RGB, 0, EMF_SETDIBITSTODEVICE_4BIT_4X4_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_4BIT_4X4_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
7952 {4, 4, 4, BI_RGB, 1, EMF_SETDIBITSTODEVICE_4BIT_4X4_SIZED, sizeof(EMF_SETDIBITSTODEVICE_4BIT_4X4_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
7953 {8, 4, 4, BI_RGB, 0, EMF_SETDIBITSTODEVICE_8BIT_4X4_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_8BIT_4X4_NOSIZE), 1, 1, {{0xff, 0xff, 0xff}}},
7954 {8, 4, 4, BI_RGB, 1, EMF_SETDIBITSTODEVICE_8BIT_4X4_SIZED, sizeof(EMF_SETDIBITSTODEVICE_8BIT_4X4_SIZED), 1, 1, {{0xff, 0xff, 0xff}}},
7962 {16, 4, 4, BI_BITFIELDS, 0, EMF_SETDIBITSTODEVICE_16BIT_4X4_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_16BIT_4X4_NOSIZE), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
7963 {16, 4, 4, BI_BITFIELDS, 1, EMF_SETDIBITSTODEVICE_16BIT_4X4_SIZED, sizeof(EMF_SETDIBITSTODEVICE_16BIT_4X4_SIZED), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
7964 {32, 4, 4, BI_BITFIELDS, 0, EMF_SETDIBITSTODEVICE_32BIT_4X4_NOSIZE, sizeof(EMF_SETDIBITSTODEVICE_32BIT_4X4_NOSIZE), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
7965 {32, 4, 4, BI_BITFIELDS, 1, EMF_SETDIBITSTODEVICE_32BIT_4X4_SIZED, sizeof(EMF_SETDIBITSTODEVICE_32BIT_4X4_SIZED), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
7966 };
7967
7968 hdc = GetDC(0);
7969
7970 for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx)
7971 {
7972 winetest_push_context("Test %d", test_idx);
7973
7974 memset(&bmi, 0, sizeof(bmi));
7975 if (tests[test_idx].infomode < 2)
7976 {
7977 bmi.i.bmiHeader.biSize = sizeof(bmi.i.bmiHeader);
7978 bmi.i.bmiHeader.biWidth = bitmap_width;
7979 bmi.i.bmiHeader.biHeight = bitmap_height;
7980 bmi.i.bmiHeader.biBitCount = tests[test_idx].bpp;
7981 bmi.i.bmiHeader.biPlanes = 1;
7982 bmi.i.bmiHeader.biCompression = tests[test_idx].compression;
7983 bmi.i.bmiHeader.biClrUsed = tests[test_idx].used_color_count;
7984 if (tests[test_idx].infomode == 1)
7985 bmi.i.bmiHeader.biSizeImage = (((bitmap_width * tests[test_idx].bpp + 31) >> 3) & ~3) * bitmap_height;
7986 memcpy(bmi.i.bmiColors, tests[test_idx].colors, sizeof(RGBQUAD) * tests[test_idx].color_count);
7987 }
7988 else
7989 {
7990 bmi.c.bmciHeader.bcSize = sizeof(bmi.c.bmciHeader);
7991 bmi.c.bmciHeader.bcWidth = bitmap_width;
7992 bmi.c.bmciHeader.bcHeight = bitmap_height;
7993 bmi.c.bmciHeader.bcPlanes = 1;
7994 bmi.c.bmciHeader.bcBitCount = tests[test_idx].bpp;
7995 for (color_idx = 0; color_idx < tests[test_idx].color_count; color_idx++)
7996 {
7997 bmi.c.bmciColors[color_idx].rgbtBlue = tests[test_idx].colors[color_idx].rgbBlue;
7998 bmi.c.bmciColors[color_idx].rgbtGreen = tests[test_idx].colors[color_idx].rgbGreen;
7999 bmi.c.bmciColors[color_idx].rgbtRed = tests[test_idx].colors[color_idx].rgbRed;
8000 }
8001 }
8002
8003 hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
8004 ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
8005
8006 ret = SetDIBitsToDevice(hdc_emf, 0, 0,
8007 tests[test_idx].width, tests[test_idx].height,
8008 0, 0, 0, bitmap_height,
8009 dib_bits, &bmi.i, DIB_RGB_COLORS);
8010 ok(ret == tests[test_idx].height, "expected SetDIBitsToDevice to return %d, got %d (lasterr %lu)\n", tests[test_idx].height, ret, GetLastError());
8011
8012 hemf = CloseEnhMetaFile(hdc_emf);
8013 ok(!!hemf, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
8014
8015 ret = compare_emf_bits(hemf, tests[test_idx].bits, tests[test_idx].bits_count,
8016 "test_emf_SetDIBitsToDevice", FALSE);
8017 if (ret)
8018 {
8019 dump_emf_bits(hemf, "test_emf_SetDIBitsToDevice");
8020 dump_emf_records(hemf, "test_emf_SetDIBitsToDevice");
8021 }
8022
8023 DeleteEnhMetaFile(hemf);
8024
8026 }
8027
8028 ReleaseDC(0, hdc);
8029}
8030
8032{
8033 HDC hdcMetafile;
8034 HMETAFILE hMetafile;
8035 BOOL ret;
8036 static const INT dx[4] = { 3, 5, 8, 12 };
8037
8038 hdcMetafile = CreateMetaFileA(NULL);
8039 ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError());
8040
8041 ret = BeginPath(hdcMetafile);
8042 ok(!ret, "BeginPath on metafile DC should fail\n");
8043
8044 ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx);
8045 ok(ret, "ExtTextOut error %ld\n", GetLastError());
8046
8047 ret = EndPath(hdcMetafile);
8048 ok(!ret, "EndPath on metafile DC should fail\n");
8049
8050 hMetafile = CloseMetaFile(hdcMetafile);
8051 ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError());
8052
8054 "mf_TextOut_on_path") != 0)
8055 {
8056 dump_mf_bits(hMetafile, "mf_TextOut_on_path");
8057 EnumMetaFile(0, hMetafile, mf_enum_proc, 0);
8058 }
8059
8060 ret = DeleteMetaFile(hMetafile);
8061 ok(ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError());
8062}
8063
8064static const unsigned char EMF_EMPTY_BITS[] =
8065{
8066 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
8067 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8068 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
8069 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8070 0xdd, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff,
8071 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
8072 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
8073 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8074 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8075 0x90, 0x06, 0x00, 0x00, 0xba, 0x03, 0x00, 0x00,
8076 0x4e, 0x02, 0x00, 0x00, 0x4a, 0x01, 0x00, 0x00,
8077 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8078 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x09, 0x00,
8079 0x10, 0x09, 0x05, 0x00, 0x0e, 0x00, 0x00, 0x00,
8080 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8081 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
8082};
8083
8085{
8086 HWND hwnd;
8087 HDC hdcDisplay, hdcMetafile;
8088 HENHMETAFILE hMetafile;
8089 BOOL ret;
8090 LOGFONTA lf;
8091 HFONT hFont;
8092 static const INT dx[4] = { 3, 5, 8, 12 };
8093 RECT rect = { 10, 20, 30, 40 };
8094
8095 /* Win9x doesn't play EMFs on invisible windows */
8096 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
8097 0, 0, 200, 200, 0, 0, 0, NULL);
8098 ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError());
8099
8100 hdcDisplay = GetDC(hwnd);
8101 ok(hdcDisplay != 0, "GetDC error %ld\n", GetLastError());
8102
8103 /* with default font */
8104 ret = BeginPath(hdcDisplay);
8105 ok(ret, "BeginPath error %ld\n", GetLastError());
8106
8107 ret = ExtTextOutA(hdcDisplay, 11, 22, 0, NULL, "Test", 4, dx);
8108 ok(ret, "ExtTextOut error %ld\n", GetLastError());
8109
8110 ret = EndPath(hdcDisplay);
8111 ok(ret, "EndPath error %ld\n", GetLastError());
8112
8113 ret = GetPath(hdcDisplay, NULL, NULL, 0);
8114 ok(!ret, "expected 0, got %d\n", ret);
8115
8116 hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL);
8117 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
8118
8119 ret = BeginPath(hdcMetafile);
8120 ok(ret, "BeginPath error %ld\n", GetLastError());
8121
8122 ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx);
8123 ok(ret, "ExtTextOut error %ld\n", GetLastError());
8124
8125 ret = EndPath(hdcMetafile);
8126 ok(ret, "EndPath error %ld\n", GetLastError());
8127
8128 ret = GetPath(hdcMetafile, NULL, NULL, 0);
8129 ok(!ret, "expected 0, got %d\n", ret);
8130
8131 hMetafile = CloseEnhMetaFile(hdcMetafile);
8132 ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
8133
8134 /* this doesn't succeed yet: EMF has correct size, all EMF records
8135 * are there, but their contents don't match for different reasons.
8136 */
8138 "emf_TextOut_on_path", FALSE) != 0)
8139 {
8140 dump_emf_bits(hMetafile, "emf_TextOut_on_path");
8141 dump_emf_records(hMetafile, "emf_TextOut_on_path");
8142 }
8143
8144 ret = DeleteEnhMetaFile(hMetafile);
8145 ok(ret, "DeleteEnhMetaFile error %ld\n", GetLastError());
8146
8147 /* with outline font */
8148 memset(&lf, 0, sizeof(lf));
8151 lf.lfWeight = FW_DONTCARE;
8152 lf.lfHeight = 7;
8154 lstrcpyA(lf.lfFaceName, "Tahoma");
8156 ok(hFont != 0, "CreateFontIndirectA error %ld\n", GetLastError());
8157 hFont = SelectObject(hdcDisplay, hFont);
8158
8159 ret = BeginPath(hdcDisplay);
8160 ok(ret, "BeginPath error %ld\n", GetLastError());
8161
8162 ret = ExtTextOutA(hdcDisplay, 11, 22, 0, NULL, "Test", 4, dx);
8163 ok(ret, "ExtTextOut error %ld\n", GetLastError());
8164
8165 ret = EndPath(hdcDisplay);
8166 ok(ret, "EndPath error %ld\n", GetLastError());
8167
8168 ret = GetPath(hdcDisplay, NULL, NULL, 0);
8169 ok(ret != 0, "expected != 0\n");
8170
8171 SelectObject(hdcDisplay, hFont);
8172
8173 hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL);
8174 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
8175
8176 hFont = SelectObject(hdcMetafile, hFont);
8177
8178 ret = BeginPath(hdcMetafile);
8179 ok(ret, "BeginPath error %ld\n", GetLastError());
8180
8181 ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx);
8182 ok(ret, "ExtTextOut error %ld\n", GetLastError());
8183
8184 ret = EndPath(hdcMetafile);
8185 ok(ret, "EndPath error %ld\n", GetLastError());
8186
8187 ret = GetPath(hdcMetafile, NULL, NULL, 0);
8188 ok(!ret, "expected 0, got %d\n", ret);
8189
8190 hFont = SelectObject(hdcMetafile, hFont);
8192
8193 hMetafile = CloseEnhMetaFile(hdcMetafile);
8194 ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
8195
8197 "emf_TextOut_outline_on_path", FALSE) != 0)
8198 {
8199 dump_emf_bits(hMetafile, "emf_TextOut_outline_on_path");
8200 dump_emf_records(hMetafile, "emf_TextOut_outline_on_path");
8201 }
8202
8203 ret = DeleteEnhMetaFile(hMetafile);
8204 ok(ret, "DeleteEnhMetaFile error %ld\n", GetLastError());
8205
8206 /* test ExtTextOut with count == -1 doesn't get written */
8207 hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL);
8208 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
8209
8210 ret = ExtTextOutA(hdcMetafile, 11, 22, ETO_OPAQUE, &rect, "Test", -1, dx);
8211 ok(!ret, "ExtTextOut error %ld\n", GetLastError());
8212
8213 hMetafile = CloseEnhMetaFile(hdcMetafile);
8214 ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
8215
8216 if (compare_emf_bits(hMetafile, EMF_EMPTY_BITS, sizeof(EMF_EMPTY_BITS),
8217 "emf_TextOut_negative_count", FALSE) != 0)
8218 {
8219 dump_emf_bits(hMetafile, "emf_TextOut_negative_count");
8220 dump_emf_records(hMetafile, "emf_TextOut_negative_count");
8221 }
8222
8223 ret = DeleteEnhMetaFile(hMetafile);
8224 ok(ret, "DeleteEnhMetaFile error %ld\n", GetLastError());
8225
8226 ret = ReleaseDC(hwnd, hdcDisplay);
8227 ok(ret, "ReleaseDC error %ld\n", GetLastError());
8229}
8230
8231static const unsigned char EMF_CLIPPING[] =
8232{
8233 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
8234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8235 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
8236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8237 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
8238 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
8239 0x04, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
8240 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8242 0x80, 0x07, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00,
8243 0xfc, 0x01, 0x00, 0x00, 0x3e, 0x01, 0x00, 0x00,
8244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8245 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
8246 0x30, 0xda, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00,
8247 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
8248 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00,
8249 0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
8250 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
8251 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
8252 0x10, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
8253 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
8254 0x00, 0x04, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
8255 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
8256 0x00, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00,
8257 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
8258 0x18, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
8259 0x64, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
8260 0xff, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
8261 0x08, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
8262 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
8263 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
8264 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
8265 0x14, 0x00, 0x00, 0x00
8266};
8267
8268static void translate( POINT *pt, UINT count, const XFORM *xform )
8269{
8270 while (count--)
8271 {
8272 FLOAT x = (FLOAT)pt->x;
8273 FLOAT y = (FLOAT)pt->y;
8274 pt->x = (LONG)floor( x * xform->eM11 + y * xform->eM21 + xform->eDx + 0.5 );
8275 pt->y = (LONG)floor( x * xform->eM12 + y * xform->eM22 + xform->eDy + 0.5 );
8276 pt++;
8277 }
8278}
8279
8280/* Compare rectangles allowing rounding errors */
8281static BOOL is_equal_rect(const RECT *rc1, const RECT *rc2)
8282{
8283 return abs(rc1->left - rc2->left) <= 1 &&
8284 abs(rc1->top - rc2->top) <= 1 &&
8285 abs(rc1->right - rc2->right) <= 1 &&
8286 abs(rc1->bottom - rc2->bottom) <= 1;
8287}
8288
8290 const ENHMETARECORD *emr, int n_objs, LPARAM param)
8291{
8292 if (emr->iType == EMR_EXTSELECTCLIPRGN)
8293 {
8294 const EMREXTSELECTCLIPRGN *clip = (const EMREXTSELECTCLIPRGN *)emr;
8295 union _rgn
8296 {
8297 RGNDATA data;
8298 char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)];
8299 };
8300 const union _rgn *rgn1;
8301 union _rgn rgn2;
8302 RECT rect, rc_transformed;
8303 const RECT *rc = (const RECT *)param;
8304 HRGN hrgn;
8305 XFORM xform;
8306 INT ret;
8307
8308 if (winetest_debug > 1)
8309 trace("EMR_EXTSELECTCLIPRGN: cbRgnData %#lx, iMode %lu\n", clip->cbRgnData, clip->iMode);
8310
8311 ok(clip->iMode == RGN_COPY, "expected RGN_COPY, got %lu\n", clip->iMode);
8312 ok(clip->cbRgnData >= sizeof(RGNDATAHEADER) + sizeof(RECT),
8313 "too small data block: %lu bytes\n", clip->cbRgnData);
8314 if (clip->cbRgnData < sizeof(RGNDATAHEADER) + sizeof(RECT))
8315 return 0;
8316
8317 rgn1 = (const union _rgn *)clip->RgnData;
8318
8319 if (winetest_debug > 1)
8320 trace("size %lu, type %lu, count %lu, rgn size %lu, bound %s\n",
8321 rgn1->data.rdh.dwSize, rgn1->data.rdh.iType,
8322 rgn1->data.rdh.nCount, rgn1->data.rdh.nRgnSize,
8323 wine_dbgstr_rect(&rgn1->data.rdh.rcBound));
8324
8325 ok(EqualRect(&rgn1->data.rdh.rcBound, rc), "rects don't match\n");
8326
8327 rect = *(const RECT *)rgn1->data.Buffer;
8328 if (winetest_debug > 1) trace("rect %s\n", wine_dbgstr_rect(&rect));
8329 ok(EqualRect(&rect, rc), "rects don't match\n");
8330
8331 ok(rgn1->data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %lu\n", rgn1->data.rdh.dwSize);
8332 ok(rgn1->data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %lu\n", rgn1->data.rdh.iType);
8333 ok(rgn1->data.rdh.nCount == 1, "expected 1, got %lu\n", rgn1->data.rdh.nCount);
8334 ok(rgn1->data.rdh.nRgnSize == sizeof(RECT),
8335 "expected sizeof(RECT), got %lu\n", rgn1->data.rdh.nRgnSize);
8336
8337 hrgn = CreateRectRgn(0, 0, 0, 0);
8338
8339 memset(&xform, 0, sizeof(xform));
8340 SetLastError(0xdeadbeef);
8341 ret = GetWorldTransform(hdc, &xform);
8342 ok(ret, "GetWorldTransform error %lu\n", GetLastError());
8343
8344 if (winetest_debug > 1) trace("xform.eM11 %f, xform.eM22 %f\n", xform.eM11, xform.eM22);
8345
8346 ret = GetClipRgn(hdc, hrgn);
8347 ok(ret == 0, "GetClipRgn returned %d, expected 0\n", ret);
8348
8349 PlayEnhMetaFileRecord(hdc, handle_table, emr, n_objs);
8350
8351 ret = GetClipRgn(hdc, hrgn);
8352 ok(ret == 1, "GetClipRgn returned %d, expected 1\n", ret);
8353
8354 ret = GetRegionData(hrgn, 0, NULL);
8355 ok(ret == sizeof(rgn2.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret);
8356
8357 ret = GetRegionData(hrgn, sizeof(rgn2), &rgn2.data);
8358 ok(ret == sizeof(rgn2), "expected sizeof(rgn2), got %u\n", ret);
8359
8360 if (winetest_debug > 1)
8361 trace("size %lu, type %lu, count %lu, rgn size %lu, bound %s\n", rgn2.data.rdh.dwSize,
8362 rgn2.data.rdh.iType, rgn2.data.rdh.nCount, rgn2.data.rdh.nRgnSize,
8363 wine_dbgstr_rect(&rgn2.data.rdh.rcBound));
8364
8365 rect = rgn2.data.rdh.rcBound;
8366 rc_transformed = *rc;
8367 translate((POINT *)&rc_transformed, 2, &xform);
8368 if (winetest_debug > 1)
8369 trace("transformed %s\n", wine_dbgstr_rect(&rc_transformed));
8370 ok(is_equal_rect(&rect, &rc_transformed), "rects don't match\n");
8371
8372 rect = *(const RECT *)rgn2.data.Buffer;
8373 if (winetest_debug > 1) trace("rect %s\n", wine_dbgstr_rect(&rect));
8374 rc_transformed = *rc;
8375 translate((POINT *)&rc_transformed, 2, &xform);
8376 if (winetest_debug > 1) trace("transformed %s\n", wine_dbgstr_rect(&rc_transformed));
8377 ok(is_equal_rect(&rect, &rc_transformed), "rects don't match\n");
8378
8379 ok(rgn2.data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %lu\n", rgn2.data.rdh.dwSize);
8380 ok(rgn2.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %lu\n", rgn2.data.rdh.iType);
8381 ok(rgn2.data.rdh.nCount == 1, "expected 1, got %lu\n", rgn2.data.rdh.nCount);
8382 ok(rgn2.data.rdh.nRgnSize == sizeof(RECT),
8383 "expected sizeof(RECT), got %lu\n", rgn2.data.rdh.nRgnSize);
8384
8386 }
8387 return 1;
8388}
8389
8390static void test_emf_clipping(void)
8391{
8392 char buffer[100];
8393 RGNDATA *rgndata = (RGNDATA *)buffer;
8394 static const RECT rc = { 0, 0, 100, 100 };
8395 RECT rc_clip = { 100, 100, 1024, 1024 };
8396 HWND hwnd;
8397 HDC hdc;
8398 HENHMETAFILE hemf;
8399 HRGN hrgn;
8400 INT ret;
8401 RECT rc_res, rc_sclip;
8402
8403 SetLastError(0xdeadbeef);
8405 ok(hdc != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
8406
8407 /* Need to write something to the emf, otherwise Windows won't play it back */
8408 LineTo(hdc, 1, 1);
8409
8410 hrgn = CreateRectRgn(rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
8412 ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
8413
8414 BeginPath(hdc);
8415 Rectangle(hdc, rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
8416 EndPath(hdc);
8418 ok(ret, "SelectClipPath error %ld\n", GetLastError());
8419
8420 SetLastError(0xdeadbeef);
8421 hemf = CloseEnhMetaFile(hdc);
8422 ok(hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
8423
8424 if (compare_emf_bits(hemf, EMF_CLIPPING, sizeof(EMF_CLIPPING),
8425 "emf_clipping", FALSE) != 0)
8426 {
8427 dump_emf_bits(hemf, "emf_clipping");
8428 dump_emf_records(hemf, "emf_clipping");
8429 }
8430
8432
8433 /* Win9x doesn't play EMFs on invisible windows */
8434 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
8435 0, 0, 200, 200, 0, 0, 0, NULL);
8436 ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError());
8437
8438 hdc = GetDC(hwnd);
8439
8440 ret = EnumEnhMetaFile(hdc, hemf, clip_emf_enum_proc, &rc_clip, &rc);
8441 ok(ret, "EnumEnhMetaFile error %ld\n", GetLastError());
8442
8443 DeleteEnhMetaFile(hemf);
8444 ReleaseDC(hwnd, hdc);
8446
8448
8450 hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom);
8452 SetRect(&rc_res, -1, -1, -1, -1);
8453 ret = GetClipBox(hdc, &rc_res);
8454 ok(ret == SIMPLEREGION, "got %d\n", ret);
8455 ok(EqualRect(&rc_res, &rc_sclip), "expected %s, got %s\n", wine_dbgstr_rect(&rc_sclip),
8456 wine_dbgstr_rect(&rc_res));
8457
8458 OffsetRect(&rc_sclip, -100, -100);
8459 ret = OffsetClipRgn(hdc, -100, -100);
8460 ok(ret == SIMPLEREGION, "got %d\n", ret);
8461 SetRect(&rc_res, -1, -1, -1, -1);
8462 ret = GetClipBox(hdc, &rc_res);
8463 ok(ret == SIMPLEREGION, "got %d\n", ret);
8464 ok(EqualRect(&rc_res, &rc_sclip), "expected %s, got %s\n", wine_dbgstr_rect(&rc_sclip),
8465 wine_dbgstr_rect(&rc_res));
8466
8467 ret = IntersectClipRect(hdc, 0, 0, 100, 100);
8468 /* all versions of Windows return COMPLEXREGION despite the region comprising one rectangle */
8469 ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "wrong region type %d\n", ret);
8470 ret = GetClipRgn(hdc, hrgn);
8471 ok(ret == 1, "expected 1, got %d\n", ret);
8472 ret = GetRegionData(hrgn, sizeof(buffer), rgndata);
8473 ok(ret == sizeof(RGNDATAHEADER) + sizeof(RECT), "got %u\n", ret);
8474 ok(rgndata->rdh.nCount == 1, "got %lu rectangles\n", rgndata->rdh.nCount);
8475 ok(EqualRect((RECT *)rgndata->Buffer, &rc), "got rect %s\n", wine_dbgstr_rect((RECT *)rgndata->Buffer));
8476 SetRect(&rc_res, -1, -1, -1, -1);
8477 ret = GetClipBox(hdc, &rc_res);
8478 ok(ret == SIMPLEREGION, "got %d\n", ret);
8479 ok(EqualRect(&rc_res, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rc),
8480 wine_dbgstr_rect(&rc_res));
8481
8482 SetRect(&rc_sclip, 0, 0, 100, 50);
8483 ret = ExcludeClipRect(hdc, 0, 50, 100, 100);
8484 /* all versions of Windows return COMPLEXREGION despite the region comprising one rectangle */
8485 ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "wrong region type %d\n", ret);
8486 ret = GetClipRgn(hdc, hrgn);
8487 ok(ret == 1, "expected 1, got %d\n", ret);
8488 ret = GetRegionData(hrgn, sizeof(buffer), rgndata);
8489 ok(ret == sizeof(RGNDATAHEADER) + sizeof(RECT), "got %u\n", ret);
8490 ok(rgndata->rdh.nCount == 1, "got %lu rectangles\n", rgndata->rdh.nCount);
8491 ok(EqualRect((RECT *)rgndata->Buffer, &rc_sclip), "got rect %s\n", wine_dbgstr_rect((RECT *)rgndata->Buffer));
8492 SetRect(&rc_res, -1, -1, -1, -1);
8493 ret = GetClipBox(hdc, &rc_res);
8494 ok(ret == SIMPLEREGION, "got %d\n", ret);
8495 ok(EqualRect(&rc_res, &rc_sclip), "expected %s, got %s\n", wine_dbgstr_rect(&rc_sclip),
8496 wine_dbgstr_rect(&rc_res));
8497
8498 hemf = CloseEnhMetaFile(hdc);
8499 DeleteEnhMetaFile(hemf);
8501}
8502
8503static const unsigned char MF_CLIP_BITS[] = {
8504 /* METAHEADER */
8505 0x01, 0x00, /* mtType */
8506 0x09, 0x00, /* mtHeaderSize */
8507 0x00, 0x03, /* mtVersion */
8508 0x32, 0x00, 0x00, 0x00, /* mtSize */
8509 0x01, 0x00, /* mtNoObjects */
8510 0x14, 0x00, 0x00, 0x00, /* mtMaxRecord (size in words of longest record) */
8511 0x00, 0x00, /* reserved */
8512
8513 /* METARECORD for CreateRectRgn(0x11, 0x22, 0x33, 0x44) */
8514 0x14, 0x00, 0x00, 0x00, /* rdSize in words */
8515 0xff, 0x06, /* META_CREATEREGION */
8516 0x00, 0x00, 0x06, 0x00, 0xf6, 0x02, 0x00, 0x00,
8517 0x24, 0x00, 0x01, 0x00, 0x02, 0x00, 0x11, 0x00,
8518 0x22, 0x00, 0x33, 0x00, 0x44, 0x00, 0x02, 0x00,
8519 0x22, 0x00, 0x44, 0x00, 0x11, 0x00, 0x33, 0x00,
8520 0x02, 0x00,
8521
8522 /* METARECORD for SelectObject */
8523 0x04, 0x00, 0x00, 0x00,
8524 0x2d, 0x01, /* META_SELECTOBJECT (not META_SELECTCLIPREGION?!) */
8525 0x00, 0x00,
8526
8527 /* METARECORD */
8528 0x04, 0x00, 0x00, 0x00,
8529 0xf0, 0x01, /* META_DELETEOBJECT */
8530 0x00, 0x00,
8531
8532 /* METARECORD for MoveTo(1,0x30) */
8533 0x05, 0x00, 0x00, 0x00, /* rdSize in words */
8534 0x14, 0x02, /* META_MOVETO */
8535 0x30, 0x00, /* y */
8536 0x01, 0x00, /* x */
8537
8538 /* METARECORD for LineTo(0x20, 0x30) */
8539 0x05, 0x00, 0x00, 0x00, /* rdSize in words */
8540 0x13, 0x02, /* META_LINETO */
8541 0x30, 0x00, /* y */
8542 0x20, 0x00, /* x */
8543
8544 /* EOF */
8545 0x03, 0x00, 0x00, 0x00,
8546 0x00, 0x00
8547};
8548
8551
8553 METARECORD *mr, int n_objs, LPARAM param)
8554{
8555 switch (mr->rdFunction) {
8558 break;
8559 case META_SELECTOBJECT:
8561 break;
8562 }
8563 return 1;
8564}
8565
8566static void test_mf_clipping(void)
8567{
8568 /* left top right bottom */
8569 static RECT rc_clip = { 0x11, 0x22, 0x33, 0x44 };
8570 HWND hwnd;
8571 HDC hdc;
8572 HMETAFILE hmf;
8573 HRGN hrgn;
8574 INT ret;
8575
8576 SetLastError(0xdeadbeef);
8578 ok(hdc != 0, "CreateMetaFileA error %ld\n", GetLastError());
8579
8580 hrgn = CreateRectRgn(rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
8582 /* Seems like it should be SIMPLEREGION, but windows returns NULLREGION? */
8583 ok(ret == NULLREGION, "expected NULLREGION, got %d\n", ret);
8584
8585 /* Draw a line that starts off left of the clip region and ends inside it */
8586 MoveToEx(hdc, 0x1, 0x30, NULL);
8587 LineTo(hdc, 0x20, 0x30);
8588
8589 SetLastError(0xdeadbeef);
8590 hmf = CloseMetaFile(hdc);
8591 ok(hmf != 0, "CloseMetaFile error %ld\n", GetLastError());
8592
8593 if (compare_mf_bits(hmf, MF_CLIP_BITS, sizeof(MF_CLIP_BITS),
8594 "mf_clipping") != 0)
8595 {
8596 dump_mf_bits(hmf, "mf_clipping");
8597 }
8598
8600
8601 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
8602 0, 0, 200, 200, 0, 0, 0, NULL);
8603 ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError());
8604
8605 hdc = GetDC(hwnd);
8606
8607 ret = EnumMetaFile(hdc, hmf, clip_mf_enum_proc, (LPARAM)&rc_clip);
8608 ok(ret, "EnumMetaFile error %ld\n", GetLastError());
8609
8610 /* Oddly, windows doesn't seem to use META_SELECTCLIPREGION */
8612 "expected 0 selectclipregion, saw %d\n", clip_mf_enum_proc_seen_selectclipregion);
8614 "expected 1 selectobject, saw %d\n", clip_mf_enum_proc_seen_selectobject);
8615
8616 DeleteMetaFile(hmf);
8617 ReleaseDC(hwnd, hdc);
8619}
8620
8621static const unsigned char MF_PATH_BITS[] =
8622{
8623 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x2c, 0x00,
8624 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
8625 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x02,
8626 0x32, 0x00, 0x32, 0x00, 0x05, 0x00, 0x00, 0x00,
8627 0x13, 0x02, 0x96, 0x00, 0x32, 0x00, 0x05, 0x00,
8628 0x00, 0x00, 0x13, 0x02, 0x96, 0x00, 0x96, 0x00,
8629 0x05, 0x00, 0x00, 0x00, 0x13, 0x02, 0x32, 0x00,
8630 0x96, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02,
8631 0x32, 0x00, 0x32, 0x00, 0x07, 0x00, 0x00, 0x00,
8632 0x1b, 0x04, 0x14, 0x00, 0x14, 0x00, 0x0a, 0x00,
8633 0x0a, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
8634};
8635
8636static void test_mf_GetPath(void)
8637{
8638 HDC hdc;
8639 HMETAFILE hmf;
8640 BOOL ret;
8641 int size;
8642
8643 SetLastError(0xdeadbeef);
8645 ok(hdc != 0, "CreateMetaFileA error %ld\n", GetLastError());
8646
8647 ret = BeginPath(hdc);
8648 ok(!ret, "BeginPath on metafile DC should fail\n");
8649 ret = MoveToEx(hdc, 50, 50, NULL);
8650 ok( ret, "MoveToEx error %ld.\n", GetLastError());
8651 ret = LineTo(hdc, 50, 150);
8652 ok( ret, "LineTo error %ld.\n", GetLastError());
8653 ret = LineTo(hdc, 150, 150);
8654 ok( ret, "LineTo error %ld.\n", GetLastError());
8655 ret = LineTo(hdc, 150, 50);
8656 ok( ret, "LineTo error %ld.\n", GetLastError());
8657 ret = LineTo(hdc, 50, 50);
8658 ok( ret, "LineTo error %ld.\n", GetLastError());
8659 Rectangle(hdc, 10, 10, 20, 20);
8660 EndPath(hdc);
8661
8662 size = GetPath(hdc, NULL, NULL, 0);
8663 ok( size == -1, "GetPath returned %d.\n", size);
8664
8665 hmf = CloseMetaFile(hdc);
8666 ok(hmf != 0, "CloseMetaFile error %ld\n", GetLastError());
8667
8668 if (compare_mf_bits (hmf, MF_PATH_BITS, sizeof(MF_PATH_BITS), "mf_GetPath") != 0)
8669 {
8670 dump_mf_bits(hmf, "mf_GetPath");
8671 EnumMetaFile(0, hmf, mf_enum_proc, 0);
8672 }
8673
8674 ret = DeleteMetaFile(hmf);
8675 ok( ret, "DeleteMetaFile error %ld\n", GetLastError());
8676}
8677
8678static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, INT nObj, LPARAM lpData)
8679{
8680 LPMETAFILEPICT lpMFP = (LPMETAFILEPICT)lpData;
8681 POINT mapping[2] = { { 0, 0 }, { 10, 10 } };
8682 /* When using MM_TEXT Win9x does not update the mapping mode
8683 * until a record is played which actually outputs something */
8684 PlayEnhMetaFileRecord(hdc, lpHTable, lpEMFR, nObj);
8685 LPtoDP(hdc, mapping, 2);
8686 if (winetest_debug > 1)
8687 trace("EMF record: iType %ld, nSize %ld, (%ld,%ld)-(%ld,%ld)\n",
8688 lpEMFR->iType, lpEMFR->nSize,
8689 mapping[0].x, mapping[0].y, mapping[1].x, mapping[1].y);
8690
8691 if (lpEMFR->iType == EMR_LINETO)
8692 {
8693 INT x0, y0, x1, y1;
8694 if (!lpMFP || lpMFP->mm == MM_TEXT)
8695 {
8696 x0 = 0;
8697 y0 = 0;
8698 x1 = (INT)floor(10 * 100.0 / LINE_X + 0.5);
8699 y1 = (INT)floor(10 * 100.0 / LINE_Y + 0.5);
8700 }
8701 else
8702 {
8703 ok(lpMFP->mm == MM_ANISOTROPIC, "mm=%ld\n", lpMFP->mm);
8704
8709 }
8710 ok(mapping[0].x == x0 && mapping[0].y == y0 && mapping[1].x == x1 && mapping[1].y == y1,
8711 "(%ld,%ld)->(%ld,%ld), expected (%d,%d)->(%d,%d)\n",
8712 mapping[0].x, mapping[0].y, mapping[1].x, mapping[1].y,
8713 x0, y0, x1, y1);
8714 }
8715 return TRUE;
8716}
8717
8718static HENHMETAFILE create_converted_emf(const METAFILEPICT *mfp)
8719{
8720 HDC hdcMf;
8721 HMETAFILE hmf;
8722 HENHMETAFILE hemf;
8723 BOOL ret;
8724 UINT size;
8725 LPBYTE pBits;
8726
8727 hdcMf = CreateMetaFileA(NULL);
8728 ok(hdcMf != NULL, "CreateMetaFile failed with error %ld\n", GetLastError());
8729 ret = LineTo(hdcMf, (INT)LINE_X, (INT)LINE_Y);
8730 ok(ret, "LineTo failed with error %ld\n", GetLastError());
8731 hmf = CloseMetaFile(hdcMf);
8732 ok(hmf != NULL, "CloseMetaFile failed with error %ld\n", GetLastError());
8733
8734 if (compare_mf_bits (hmf, MF_LINETO_BITS, sizeof(MF_LINETO_BITS), "mf_LineTo") != 0)
8735 {
8736 dump_mf_bits(hmf, "mf_LineTo");
8737 EnumMetaFile(0, hmf, mf_enum_proc, 0);
8738 }
8739
8740 size = GetMetaFileBitsEx(hmf, 0, NULL);
8741 ok(size, "GetMetaFileBitsEx failed with error %ld\n", GetLastError());
8742 pBits = malloc(size);
8743 GetMetaFileBitsEx(hmf, size, pBits);
8744 DeleteMetaFile(hmf);
8745 hemf = SetWinMetaFileBits(size, pBits, NULL, mfp);
8746 free(pBits);
8747 return hemf;
8748}
8749
8750static void test_mf_conversions(void)
8751{
8752 trace("Testing MF->EMF conversion (MM_ANISOTROPIC)\n");
8753 {
8755 HENHMETAFILE hemf;
8756 METAFILEPICT mfp;
8757 RECT rect = { 0, 0, 100, 100 };
8758 mfp.mm = MM_ANISOTROPIC;
8759 mfp.xExt = 100;
8760 mfp.yExt = 100;
8761 mfp.hMF = NULL;
8762 hemf = create_converted_emf(&mfp);
8763
8765 "emf_LineTo MM_ANISOTROPIC", TRUE) != 0)
8766 {
8767 dump_emf_bits(hemf, "emf_LineTo MM_ANISOTROPIC");
8768 dump_emf_records(hemf, "emf_LineTo MM_ANISOTROPIC");
8769 }
8770
8772
8773 DeleteEnhMetaFile(hemf);
8775 }
8776
8777 trace("Testing MF->EMF conversion (MM_TEXT)\n");
8778 {
8780 HENHMETAFILE hemf;
8781 METAFILEPICT mfp;
8782 RECT rect = { 0, 0, 100, 100 };
8783 mfp.mm = MM_TEXT;
8784 mfp.xExt = 0;
8785 mfp.yExt = 0;
8786 mfp.hMF = NULL;
8787 hemf = create_converted_emf(&mfp);
8788
8790 "emf_LineTo MM_TEXT", TRUE) != 0)
8791 {
8792 dump_emf_bits(hemf, "emf_LineTo MM_TEXT");
8793 dump_emf_records(hemf, "emf_LineTo MM_TEXT");
8794 }
8795
8797
8798 DeleteEnhMetaFile(hemf);
8800 }
8801
8802 trace("Testing MF->EMF conversion (NULL mfp)\n");
8803 {
8805 HENHMETAFILE hemf;
8806 RECT rect = { 0, 0, 100, 100 };
8807 hemf = create_converted_emf(NULL);
8808
8810 "emf_LineTo NULL", TRUE) != 0)
8811 {
8812 dump_emf_bits(hemf, "emf_LineTo NULL");
8813 dump_emf_records(hemf, "emf_LineTo NULL");
8814 }
8815
8817
8818 DeleteEnhMetaFile(hemf);
8820 }
8821}
8822
8824 LONG mm, LONG xExt, LONG yExt,
8825 RECTL * rclBounds, RECTL * rclFrame)
8826{
8827 METAFILEPICT mfp;
8828 METAFILEPICT * mfpPtr = NULL;
8829 HENHMETAFILE emf;
8831 UINT res;
8832
8833 if (!mfpIsNull)
8834 {
8835 mfp.mm = mm;
8836 mfp.xExt = xExt;
8837 mfp.yExt = yExt;
8838 mfpPtr = &mfp;
8839 }
8840
8842 ok(emf != NULL, "SetWinMetaFileBits failed\n");
8843 if (!emf) return FALSE;
8845 ok(res != 0, "GetEnhMetaHeader failed\n");
8847 if (!res) return FALSE;
8848
8849 *rclBounds = header.rclBounds;
8850 *rclFrame = header.rclFrame;
8851 return TRUE;
8852}
8853
8855 LONG mm, LONG xExt, LONG yExt,
8856 RECTL * rclBoundsExpected, RECTL * rclFrameExpected)
8857{
8858 RECTL rclBounds, rclFrame;
8859
8860 if (getConvertedFrameAndBounds(buffer_size, buffer, mfpIsNull, mm, xExt, yExt, &rclBounds, &rclFrame))
8861 {
8862 const char * msg;
8863 char buf[64];
8864
8865 if (mfpIsNull)
8866 {
8867 msg = "mfp == NULL";
8868 }
8869 else
8870 {
8871 const char * mm_str;
8872 switch (mm)
8873 {
8874 case MM_ANISOTROPIC: mm_str = "MM_ANISOTROPIC"; break;
8875 case MM_ISOTROPIC: mm_str = "MM_ISOTROPIC"; break;
8876 default: mm_str = "Unexpected";
8877 }
8878 sprintf(buf, "mm=%s, xExt=%ld, yExt=%ld", mm_str, xExt, yExt);
8879 msg = buf;
8880 }
8881
8882 ok(rclBounds.left == rclBoundsExpected->left, "rclBounds.left: Expected %ld, got %ld (%s)\n", rclBoundsExpected->left, rclBounds.left, msg);
8883 ok(rclBounds.top == rclBoundsExpected->top, "rclBounds.top: Expected %ld, got %ld (%s)\n", rclBoundsExpected->top, rclBounds.top, msg);
8884 ok(rclBounds.right == rclBoundsExpected->right, "rclBounds.right: Expected %ld, got %ld (%s)\n", rclBoundsExpected->right, rclBounds.right, msg);
8885 ok(rclBounds.bottom == rclBoundsExpected->bottom, "rclBounds.bottom: Expected %ld, got %ld (%s)\n", rclBoundsExpected->bottom, rclBounds.bottom, msg);
8886 ok(rclFrame.left == rclFrameExpected->left, "rclFrame.left: Expected %ld, got %ld (%s)\n", rclFrameExpected->left, rclFrame.left, msg);
8887 ok(rclFrame.top == rclFrameExpected->top, "rclFrame.top: Expected %ld, got %ld (%s)\n", rclFrameExpected->top, rclFrame.top, msg);
8888 ok(rclFrame.right == rclFrameExpected->right, "rclFrame.right: Expected %ld, got %ld (%s)\n", rclFrameExpected->right, rclFrame.right, msg);
8889 ok(rclFrame.bottom == rclFrameExpected->bottom, "rclFrame.bottom: Expected %ld, got %ld (%s)\n", rclFrameExpected->bottom, rclFrame.bottom, msg);
8890 }
8891}
8892
8894{
8895 HMETAFILE wmf;
8896 HDC wmfDC;
8897 BYTE * buffer;
8899 RECT rect;
8900 UINT res;
8901 RECTL rclBoundsAnisotropic, rclFrameAnisotropic;
8902 RECTL rclBoundsIsotropic, rclFrameIsotropic;
8903 RECTL rclBounds, rclFrame;
8904 HDC dc;
8905 LONG diffx, diffy;
8906
8907 wmfDC = CreateMetaFileA(NULL);
8908 ok(wmfDC != NULL, "CreateMetaFile failed\n");
8909 if (!wmfDC) return;
8910
8911 SetWindowExtEx(wmfDC, 100, 100, NULL);
8912 SetRect(&rect, 0, 0, 50, 50);
8914 wmf = CloseMetaFile(wmfDC);
8915 ok(wmf != NULL, "Metafile creation failed\n");
8916 if (!wmf) return;
8917
8919 ok(buffer_size != 0, "GetMetaFileBitsEx failed\n");
8920 if (buffer_size == 0)
8921 {
8922 DeleteMetaFile(wmf);
8923 return;
8924 }
8925
8927 ok(buffer != NULL, "malloc failed\n");
8928 if (!buffer)
8929 {
8930 DeleteMetaFile(wmf);
8931 return;
8932 }
8933
8935 ok(res == buffer_size, "GetMetaFileBitsEx failed\n");
8936 DeleteMetaFile(wmf);
8937 if (res != buffer_size)
8938 {
8939 free(buffer);
8940 return;
8941 }
8942
8943 /* Get the reference bounds and frame */
8944 getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 0, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8945 getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 0, 0, &rclBoundsIsotropic, &rclFrameIsotropic);
8946
8947 ok(rclBoundsAnisotropic.left == 0 && rclBoundsAnisotropic.top == 0 &&
8948 rclBoundsIsotropic.left == 0 && rclBoundsIsotropic.top == 0,
8949 "SetWinMetaFileBits: Reference bounds: Left and top bound must be zero\n");
8950
8951 ok(rclBoundsAnisotropic.right >= rclBoundsIsotropic.right, "SetWinMetaFileBits: Reference bounds: Invalid right bound\n");
8952 ok(rclBoundsAnisotropic.bottom >= rclBoundsIsotropic.bottom, "SetWinMetaFileBits: Reference bounds: Invalid bottom bound\n");
8953 diffx = rclBoundsIsotropic.right - rclBoundsIsotropic.bottom;
8954 if (diffx < 0) diffx = -diffx;
8955 ok(diffx <= 1, "SetWinMetaFileBits (MM_ISOTROPIC): Reference bounds are not isotropic\n");
8956
8958
8959 /* Allow 1 mm difference (rounding errors) */
8960 diffx = rclBoundsAnisotropic.right - GetDeviceCaps(dc, HORZRES) / 2;
8961 diffy = rclBoundsAnisotropic.bottom - GetDeviceCaps(dc, VERTRES) / 2;
8962 if (diffx < 0) diffx = -diffx;
8963 if (diffy < 0) diffy = -diffy;
8964 todo_wine
8965 {
8966 ok(diffx <= 1 && diffy <= 1,
8967 "SetWinMetaFileBits (MM_ANISOTROPIC): Reference bounds: The whole device surface must be used (%dx%d), but got (%ldx%ld)\n",
8968 GetDeviceCaps(dc, HORZRES) / 2, GetDeviceCaps(dc, VERTRES) / 2, rclBoundsAnisotropic.right, rclBoundsAnisotropic.bottom);
8969 }
8970
8971 /* Allow 1 mm difference (rounding errors) */
8972 diffx = rclFrameAnisotropic.right / 100 - GetDeviceCaps(dc, HORZSIZE) / 2;
8973 diffy = rclFrameAnisotropic.bottom / 100 - GetDeviceCaps(dc, VERTSIZE) / 2;
8974 if (diffx < 0) diffx = -diffx;
8975 if (diffy < 0) diffy = -diffy;
8976 todo_wine
8977 {
8978 ok(diffx <= 1 && diffy <= 1,
8979 "SetWinMetaFileBits (MM_ANISOTROPIC): Reference frame: The whole device surface must be used (%dx%d), but got (%ldx%ld)\n",
8980 GetDeviceCaps(dc, HORZSIZE) / 2, GetDeviceCaps(dc, VERTSIZE) / 2, rclFrameAnisotropic.right / 100, rclFrameAnisotropic.bottom / 100);
8981 }
8982 DeleteDC(dc);
8983
8984 /* If the METAFILEPICT pointer is NULL, the MM_ANISOTROPIC mapping mode and the whole device surface are used */
8985 checkConvertedFrameAndBounds(buffer_size, buffer, TRUE, 0, 0, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8986
8987 /* If xExt or yExt is zero or negative, the whole device surface is used */
8988 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 10000, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8989 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 10000, 0, &rclBoundsIsotropic, &rclFrameIsotropic);
8990 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 0, 10000, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8991 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 0, 10000, &rclBoundsIsotropic, &rclFrameIsotropic);
8992 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, -10000, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8993 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, -10000, 0, &rclBoundsIsotropic, &rclFrameIsotropic);
8994 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 0, -10000, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8995 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 0, -10000, &rclBoundsIsotropic, &rclFrameIsotropic);
8996 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, -10000, 10000, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8997 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, -10000, 10000, &rclBoundsIsotropic, &rclFrameIsotropic);
8998 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 10000, -10000, &rclBoundsAnisotropic, &rclFrameAnisotropic);
8999 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 10000, -10000, &rclBoundsIsotropic, &rclFrameIsotropic);
9000
9001 /* MSDN says that negative xExt and yExt values specify a ratio.
9002 Check that this is wrong and the whole device surface is used */
9003 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, -1000, -100, &rclBoundsAnisotropic, &rclFrameAnisotropic);
9004 checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, -1000, -100, &rclBoundsIsotropic, &rclFrameIsotropic);
9005
9006 /* Ordinary conversions */
9007
9008 if (getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 30000, 20000, &rclBounds, &rclFrame))
9009 {
9010 ok(rclFrame.left == 0 && rclFrame.top == 0 && rclFrame.right == 30000 && rclFrame.bottom == 20000,
9011 "SetWinMetaFileBits (MM_ANISOTROPIC): rclFrame contains invalid values\n");
9012 ok(rclBounds.left == 0 && rclBounds.top == 0 && rclBounds.right > rclBounds.bottom,
9013 "SetWinMetaFileBits (MM_ANISOTROPIC): rclBounds contains invalid values\n");
9014 }
9015
9016 if (getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 30000, 20000, &rclBounds, &rclFrame))
9017 {
9018 ok(rclFrame.left == 0 && rclFrame.top == 0 && rclFrame.right == 30000 && rclFrame.bottom == 20000,
9019 "SetWinMetaFileBits (MM_ISOTROPIC): rclFrame contains invalid values\n");
9020 ok(rclBounds.left == 0 && rclBounds.top == 0,
9021 "SetWinMetaFileBits (MM_ISOTROPIC): rclBounds contains invalid values\n");
9022
9023 /* Wine has a rounding error */
9024 diffx = rclBounds.right - rclBounds.bottom;
9025 if (diffx < 0) diffx = -diffx;
9026 ok(diffx <= 1, "SetWinMetaFileBits (MM_ISOTROPIC): rclBounds is not isotropic\n");
9027 }
9028
9029 if (getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_HIMETRIC, 30000, 20000, &rclBounds, &rclFrame))
9030 {
9031 ok(rclFrame.right - rclFrame.left != 30000 && rclFrame.bottom - rclFrame.top != 20000,
9032 "SetWinMetaFileBits: xExt and yExt must be ignored for mapping modes other than MM_ANISOTROPIC and MM_ISOTROPIC\n");
9033 }
9034
9035 free(buffer);
9036}
9037
9038static BOOL near_match(int x, int y)
9039{
9040 int epsilon = min(abs(x), abs(y));
9041
9042 epsilon = max(epsilon/100, 2);
9043
9044 if(x < y - epsilon || x > y + epsilon) return FALSE;
9045 return TRUE;
9046}
9047
9048static void getwinmetafilebits(UINT mode, int scale, RECT *rc)
9049{
9050 HENHMETAFILE emf, emf2;
9051 HDC display_dc, emf_dc;
9052 ENHMETAHEADER *enh_header, *enh2_header;
9053 UINT size, emf_size, i, emf2_size;
9054 WORD check = 0;
9055 DWORD rec_num = 0;
9056 METAHEADER *mh = NULL;
9057 METARECORD *rec;
9058 INT horz_res, vert_res, horz_size, vert_size;
9059 INT curve_caps, line_caps, poly_caps;
9060 METAFILEPICT mfp;
9061
9063 ok(display_dc != NULL, "display_dc is NULL\n");
9064
9065 horz_res = GetDeviceCaps(display_dc, HORZRES);
9066 vert_res = GetDeviceCaps(display_dc, VERTRES);
9067 horz_size = GetDeviceCaps(display_dc, HORZSIZE);
9068 vert_size = GetDeviceCaps(display_dc, VERTSIZE);
9069
9070 emf_dc = CreateEnhMetaFileA(display_dc, NULL, rc, NULL);
9071 ok(emf_dc != NULL, "emf_dc is NULL\n");
9072
9073 curve_caps = GetDeviceCaps(emf_dc, CURVECAPS);
9074 ok(curve_caps == 511, "expect 511 got %d\n", curve_caps);
9075
9076 line_caps = GetDeviceCaps(emf_dc, LINECAPS);
9077 ok(line_caps == 254, "expect 254 got %d\n", line_caps);
9078
9079 poly_caps = GetDeviceCaps(emf_dc, POLYGONALCAPS);
9080 ok(poly_caps == 255, "expect 511 got %d\n", poly_caps);
9081
9082 for(i = 0; i < 3000; i++) /* This is enough to take emf_size > 0xffff */
9083 Rectangle(emf_dc, 0, 0, 1000, 20);
9084 emf = CloseEnhMetaFile(emf_dc);
9085 ok(emf != NULL, "emf is NULL\n");
9086
9087 emf_size = GetEnhMetaFileBits(emf, 0, NULL);
9088 enh_header = malloc(emf_size);
9089 emf_size = GetEnhMetaFileBits(emf, emf_size, (BYTE*)enh_header);
9091 /* multiply szlDevice.cx by scale, when scale != 1 the recording and playback dcs
9092 have different resolutions */
9093 enh_header->szlDevice.cx *= scale;
9094 emf = SetEnhMetaFileBits(emf_size, (BYTE*)enh_header);
9095 ok(emf != NULL, "emf is NULL\n");
9096 ok(EqualRect((RECT*)&enh_header->rclFrame, rc), "Frame rectangles differ\n");
9097
9099 ok(size ||
9100 broken(size == 0), /* some versions of winxp fail for some reason */
9101 "GetWinMetaFileBits returns 0\n");
9102 if(!size) goto end;
9103 mh = malloc(size);
9105
9106 for(i = 0; i < size / 2; i++) check += ((WORD*)mh)[i];
9107 ok(check == 0, "check %04x\n", check);
9108
9109 rec = (METARECORD*)(mh + 1);
9110
9111 while(rec->rdSize && rec->rdFunction)
9112 {
9113 const DWORD chunk_size = 0x2000;
9114 DWORD mfcomment_chunks = (emf_size + chunk_size - 1) / chunk_size;
9115
9116 if(rec_num < mfcomment_chunks)
9117 {
9118 DWORD this_chunk_size = chunk_size;
9119
9120 if(rec_num == mfcomment_chunks - 1)
9121 this_chunk_size = emf_size - rec_num * chunk_size;
9122
9123 ok(rec->rdSize == (this_chunk_size + 44) / 2, "%04lx: got %04lx expected %04lx\n", rec_num, rec->rdSize, (this_chunk_size + 44) / 2);
9124 ok(rec->rdFunction == META_ESCAPE, "%04lx: got %04x\n", rec_num, rec->rdFunction);
9125 if(rec->rdSize < (this_chunk_size + 44) / 2) break;
9126 ok(rec->rdParm[0] == MFCOMMENT, "got %04x\n", rec->rdParm[0]);
9127 ok(rec->rdParm[1] == this_chunk_size + 34, "got %04x %x\n", rec->rdParm[1], emf_size + 34);
9128 ok(rec->rdParm[2] == 0x4d57, "got %04x\n", rec->rdParm[2]); /* WMFC */
9129 ok(rec->rdParm[3] == 0x4346, "got %04x\n", rec->rdParm[3]); /* " */
9130 ok(rec->rdParm[4] == 1, "got %04x\n", rec->rdParm[4]);
9131 ok(rec->rdParm[5] == 0, "got %04x\n", rec->rdParm[5]);
9132 ok(rec->rdParm[6] == 0, "got %04x\n", rec->rdParm[6]);
9133 ok(rec->rdParm[7] == 1, "got %04x\n", rec->rdParm[7]);
9134 /* parm[8] is the checksum, tested above */
9135 if(rec_num > 0) ok(rec->rdParm[8] == 0, "got %04x\n", rec->rdParm[8]);
9136 ok(rec->rdParm[9] == 0, "got %04x\n", rec->rdParm[9]);
9137 ok(rec->rdParm[10] == 0, "got %04x\n", rec->rdParm[10]);
9138 ok(rec->rdParm[11] == mfcomment_chunks, "got %04x\n", rec->rdParm[11]); /* num chunks */
9139 ok(rec->rdParm[12] == 0, "got %04x\n", rec->rdParm[12]);
9140 ok(rec->rdParm[13] == this_chunk_size, "got %04x expected %04lx\n", rec->rdParm[13], this_chunk_size);
9141 ok(rec->rdParm[14] == 0, "got %04x\n", rec->rdParm[14]);
9142 ok(*(DWORD*)(rec->rdParm + 15) == emf_size - this_chunk_size - rec_num * chunk_size, "got %08lx\n", *(DWORD*)(rec->rdParm + 15)); /* DWORD size remaining after current chunk */
9143 ok(*(DWORD*)(rec->rdParm + 17) == emf_size, "got %08lx emf_size %08x\n", *(DWORD*)(rec->rdParm + 17), emf_size);
9144 ok(!memcmp(rec->rdParm + 19, (char*)enh_header + rec_num * chunk_size, this_chunk_size), "bits mismatch\n");
9145 }
9146
9147 else if(rec_num == mfcomment_chunks)
9148 {
9149 ok(rec->rdFunction == META_SETMAPMODE, "got %04x\n", rec->rdFunction);
9150 ok(rec->rdParm[0] == mode, "got %04x\n", rec->rdParm[0]);
9151 }
9152 else if(rec_num == mfcomment_chunks + 1)
9153 {
9154 POINT pt;
9155 ok(rec->rdFunction == META_SETWINDOWORG, "got %04x\n", rec->rdFunction);
9156 switch(mode)
9157 {
9158 case MM_TEXT:
9159 case MM_ISOTROPIC:
9160 case MM_ANISOTROPIC:
9161 pt.y = MulDiv(rc->top, vert_res, vert_size * 100) + 1;
9162 pt.x = MulDiv(rc->left, horz_res, horz_size * 100);
9163 break;
9164 case MM_LOMETRIC:
9165 pt.y = MulDiv(-rc->top, 1, 10) + 1;
9166 pt.x = MulDiv( rc->left, 1, 10);
9167 break;
9168 case MM_HIMETRIC:
9169 pt.y = -rc->top + 1;
9170 pt.x = (rc->left >= 0) ? rc->left : rc->left + 1; /* strange but true */
9171 break;
9172 case MM_LOENGLISH:
9173 pt.y = MulDiv(-rc->top, 10, 254) + 1;
9174 pt.x = MulDiv( rc->left, 10, 254);
9175 break;
9176 case MM_HIENGLISH:
9177 pt.y = MulDiv(-rc->top, 100, 254) + 1;
9178 pt.x = MulDiv( rc->left, 100, 254);
9179 break;
9180 case MM_TWIPS:
9181 pt.y = MulDiv(-rc->top, 72 * 20, 2540) + 1;
9182 pt.x = MulDiv( rc->left, 72 * 20, 2540);
9183 break;
9184 default:
9185 pt.x = pt.y = 0;
9186 }
9187 ok(near_match((short)rec->rdParm[0], pt.y), "got %d expect %ld\n", (short)rec->rdParm[0], pt.y);
9188 ok(near_match((short)rec->rdParm[1], pt.x), "got %d expect %ld\n", (short)rec->rdParm[1], pt.x);
9189 }
9190 if(rec_num == mfcomment_chunks + 2)
9191 {
9192 ok(rec->rdFunction == META_SETWINDOWEXT, "got %04x\n", rec->rdFunction);
9193 ok(near_match((short)rec->rdParm[0], MulDiv(rc->bottom - rc->top, vert_res, vert_size * 100)),
9194 "got %d\n", (short)rec->rdParm[0]);
9195 ok(near_match((short)rec->rdParm[1], MulDiv(rc->right - rc->left, horz_res, horz_size * 100)),
9196 "got %d\n", (short)rec->rdParm[1]);
9197 }
9198
9199 rec_num++;
9200 rec = (METARECORD*)((WORD*)rec + rec->rdSize);
9201 }
9202
9203 /* Show that we get the original back when we do the reverse conversion.
9204 mfp is ignored in this case. */
9205 mfp.mm = MM_ISOTROPIC;
9206 mfp.xExt = 0xcafe;
9207 mfp.yExt = 0xbeef;
9208 emf2 = SetWinMetaFileBits( size, (BYTE*)mh, NULL, &mfp );
9209 ok( !!emf2, "got NULL\n" );
9210 emf2_size = GetEnhMetaFileBits( emf2, 0, NULL );
9211 enh2_header = malloc( emf2_size );
9212 emf2_size = GetEnhMetaFileBits( emf2, emf2_size, (BYTE*)enh2_header );
9213 ok( emf_size == emf2_size, "%d %d\n", emf_size, emf2_size );
9214 ok( !memcmp( enh_header, enh2_header, emf_size ), "mismatch\n" );
9215 free( enh2_header );
9216 DeleteEnhMetaFile( emf2 );
9217
9218end:
9219 free(mh);
9220 free(enh_header);
9222
9224}
9225
9227{
9228 UINT mode;
9229 RECT frames[] =
9230 {
9231 { 1000, 2000, 3000, 6000},
9232 {-1000, 2000, 3000, 6000},
9233 { 1000, -2000, 3000, 6000},
9234 { 1005, 2005, 3000, 6000},
9235 {-1005, -2005, 3000, 6000},
9236 {-1005, -2010, 3000, 6000},
9237 {-1005, 2010, 3000, 6000},
9238 { 0, 0, 1, 1},
9239 { -1, -1, 1, 1},
9240 { 0, 0, 0, 0}
9241 };
9242
9243 for(mode = MM_MIN; mode <= MM_MAX; mode++)
9244 {
9245 RECT *rc;
9246 for(rc = frames; rc->right - rc->left > 0; rc++)
9247 {
9248 getwinmetafilebits(mode, 1, rc);
9249 getwinmetafilebits(mode, 2, rc);
9250 }
9251 }
9252}
9253
9254static BOOL (WINAPI *pGdiIsMetaPrintDC)(HDC);
9255static BOOL (WINAPI *pGdiIsMetaFileDC)(HDC);
9256static BOOL (WINAPI *pGdiIsPlayMetafileDC)(HDC);
9257
9258static void test_gdiis(void)
9259{
9260 RECT rect = {0,0,100,100};
9261 HDC hdc, hemfDC, hmfDC;
9262 HENHMETAFILE hemf;
9264
9265 /* resolve all the functions */
9266 hgdi32 = GetModuleHandleA("gdi32.dll");
9267 pGdiIsMetaPrintDC = (void*) GetProcAddress(hgdi32, "GdiIsMetaPrintDC");
9268 pGdiIsMetaFileDC = (void*) GetProcAddress(hgdi32, "GdiIsMetaFileDC");
9269 pGdiIsPlayMetafileDC = (void*) GetProcAddress(hgdi32, "GdiIsPlayMetafileDC");
9270
9271 if(!pGdiIsMetaPrintDC || !pGdiIsMetaFileDC || !pGdiIsPlayMetafileDC)
9272 {
9273 win_skip("Needed GdiIs* functions are not available\n");
9274 return;
9275 }
9276
9277 /* try with nothing */
9278 ok(!pGdiIsMetaPrintDC(NULL), "ismetaprint with NULL parameter\n");
9279 ok(!pGdiIsMetaFileDC(NULL), "ismetafile with NULL parameter\n");
9280 ok(!pGdiIsPlayMetafileDC(NULL), "isplaymetafile with NULL parameter\n");
9281
9282 /* try with a metafile */
9283 hmfDC = CreateMetaFileA(NULL);
9284 ok(!pGdiIsMetaPrintDC(hmfDC), "ismetaprint on metafile\n");
9285 ok(pGdiIsMetaFileDC(hmfDC), "ismetafile on metafile\n");
9286 ok(!pGdiIsPlayMetafileDC(hmfDC), "isplaymetafile on metafile\n");
9288
9289 /* try with an enhanced metafile */
9290 hdc = GetDC(NULL);
9291 hemfDC = CreateEnhMetaFileW(hdc, NULL, &rect, NULL);
9292 ok(hemfDC != NULL, "failed to create emf\n");
9293
9294 ok(!pGdiIsMetaPrintDC(hemfDC), "ismetaprint on emf\n");
9295 ok(pGdiIsMetaFileDC(hemfDC), "ismetafile on emf\n");
9296 ok(!pGdiIsPlayMetafileDC(hemfDC), "isplaymetafile on emf\n");
9297
9298 hemf = CloseEnhMetaFile(hemfDC);
9299 ok(hemf != NULL, "failed to close EMF\n");
9300 DeleteEnhMetaFile(hemf);
9302}
9303
9305{
9306 BYTE data[256];
9307 HENHMETAFILE hemf;
9308 ENHMETAHEADER *emh;
9309
9310 memset(data, 0xAA, sizeof(data));
9311 SetLastError(0xdeadbeef);
9312 hemf = SetEnhMetaFileBits(sizeof(data), data);
9313 ok(!hemf, "SetEnhMetaFileBits should fail\n");
9315 "expected ERROR_INVALID_DATA, got %lu\n", GetLastError());
9316
9317 emh = (ENHMETAHEADER *)data;
9318 memset(emh, 0, sizeof(*emh));
9319
9320 emh->iType = EMR_HEADER;
9321 emh->nSize = sizeof(*emh);
9323 /* emh->nVersion = 0x10000; XP doesn't care about version */
9324 emh->nBytes = sizeof(*emh);
9325 /* emh->nRecords = 1; XP doesn't care about records */
9326 emh->nHandles = 1; /* XP refuses to load a EMF if nHandles == 0 */
9327
9328 SetLastError(0xdeadbeef);
9329 hemf = SetEnhMetaFileBits(emh->nBytes, data);
9330 ok(hemf != 0, "SetEnhMetaFileBits error %lu\n", GetLastError());
9331 DeleteEnhMetaFile(hemf);
9332
9333 /* XP refuses to load unaligned EMF */
9334 emh->nBytes++;
9335 SetLastError(0xdeadbeef);
9336 hemf = SetEnhMetaFileBits(emh->nBytes, data);
9337 ok(!hemf, "SetEnhMetaFileBits should fail\n");
9338 ok(GetLastError() == 0xdeadbeef, "Expected deadbeef, got %lu\n", GetLastError());
9339 DeleteEnhMetaFile(hemf);
9340
9341 emh->dSignature = 0;
9342 emh->nBytes--;
9343 SetLastError(0xdeadbeef);
9344 hemf = SetEnhMetaFileBits(emh->nBytes, data);
9345 ok(!hemf, "SetEnhMetaFileBits should fail\n");
9346 ok(GetLastError() == 0xdeadbeef, "Expected deadbeef, got %lu\n", GetLastError());
9347 DeleteEnhMetaFile(hemf);
9348}
9349
9350static void test_emf_polybezier(void)
9351{
9352 HDC hdcMetafile;
9353 HENHMETAFILE hemf;
9354 POINT pts[4];
9355 BOOL ret;
9356
9357 SetLastError(0xdeadbeef);
9358 hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
9359 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
9360
9361 pts[0].x = pts[0].y = 10;
9362 pts[1].x = pts[1].y = 20;
9363 pts[2].x = pts[2].y = 15;
9364 pts[3].x = pts[3].y = 25;
9365 ret = PolyBezierTo(hdcMetafile, pts, 3); /* EMR_POLYBEZIERTO16 */
9366 ok( ret, "PolyBezierTo failed\n" );
9367 ret = PolyBezier(hdcMetafile, pts, 4); /* EMR_POLYBEZIER16 */
9368 ok( ret, "PolyBezier failed\n" );
9369
9370 pts[0].x = pts[0].y = 32769;
9371 ret = PolyBezier(hdcMetafile, pts, 4); /* EMR_POLYBEZIER */
9372 ok( ret, "PolyBezier failed\n" );
9373 ret = PolyBezierTo(hdcMetafile, pts, 3); /* EMR_POLYBEZIERTO */
9374 ok( ret, "PolyBezierTo failed\n" );
9375
9376 hemf = CloseEnhMetaFile(hdcMetafile);
9377 ok(hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
9378
9380 "emf_Bezier", FALSE) != 0)
9381 {
9382 dump_emf_bits(hemf, "emf_Bezier");
9383 dump_emf_records(hemf, "emf_Bezier");
9384 }
9385
9386 DeleteEnhMetaFile(hemf);
9387}
9388
9389static const unsigned char EMF_PATH_BITS[] =
9390{
9391 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
9392 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
9393 0x96, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
9394 0x08, 0x01, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00,
9395 0x7e, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00,
9396 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
9397 0x00, 0x03, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
9398 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9400 0x97, 0x06, 0x00, 0x00, 0xb1, 0x03, 0x00, 0x00,
9401 0xbe, 0x01, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x00,
9402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9403 0x00, 0x00, 0x00, 0x00, 0x90, 0xcf, 0x06, 0x00,
9404 0xaf, 0xd0, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00,
9405 0x08, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
9406 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
9407 0x32, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
9408 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
9409 0x96, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
9410 0x10, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
9411 0x96, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
9412 0x10, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
9413 0x32, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
9414 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
9415 0x32, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
9416 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
9417 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
9418 0x13, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00,
9419 0x28, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
9420 0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
9421 0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
9422 0x1d, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
9423 0x15, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00,
9424 0x28, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
9425 0x17, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
9426 0x1a, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
9427 0x1b, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
9428 0x17, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
9429 0x28, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
9430 0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
9431 0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
9432 0x1d, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
9433 0x15, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00,
9434 0x28, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
9435 0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
9436 0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
9437 0x1d, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
9438 0x15, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00,
9439 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
9440 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
9441 0x13, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
9442 0x20, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
9443 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
9444 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
9445 0x05, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00,
9446 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9447 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
9448 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00,
9449 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00,
9450 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00,
9451 0x59, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
9452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9453 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
9454 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00,
9455 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00,
9456 0x14, 0x00, 0x14, 0x00, 0x5a, 0x00, 0x00, 0x00,
9457 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9458 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
9459 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00,
9460 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
9461 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00,
9462 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00,
9463 0x14, 0x00, 0x14, 0x00, 0x5c, 0x00, 0x00, 0x00,
9464 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9465 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
9466 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
9467 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00,
9468 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00,
9469 0x1e, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x14, 0x00,
9470 0x14, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x14, 0x00,
9471 0x14, 0x00, 0x0a, 0x00, 0x06, 0x02, 0x04, 0x04,
9472 0x04, 0x02, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00,
9473 0x29, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
9474 0x25, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
9475 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x42,
9476 0x00, 0x00, 0x34, 0x43, 0x3c, 0x00, 0x00, 0x00,
9477 0x08, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
9478 0x08, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
9479 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
9480 0x0a, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
9481 0x96, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
9482 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9483 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
9484 0xff, 0xff, 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00,
9485 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9486 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
9487};
9488
9489static const unsigned char EMF_EMPTY_PATH_BITS[] =
9490{
9491 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
9492 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9493 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
9494 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9495 0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff,
9496 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
9497 0xc8, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
9498 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9500 0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00,
9501 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
9502 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9503 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00,
9504 0x80, 0xa9, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00,
9505 0x08, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
9506 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00,
9507 0x08, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
9508 0x08, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
9509 0x08, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
9510 0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00,
9511 0x08, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
9512 0x08, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
9513 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
9514 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9515 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
9516};
9517
9518static void test_emf_paths(void)
9519{
9520 POINT pts[9] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}, {30, 30}, {40, 20}, {20, 30}, {20, 20}, {20, 10}};
9521 DWORD counts[2] = {2, 2};
9524 HDC hdcMetafile;
9525 HENHMETAFILE hemf;
9526 BOOL ret;
9527 int size;
9528
9529 SetLastError(0xdeadbeef);
9530 hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
9531 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
9532
9533 ret = BeginPath(hdcMetafile);
9534 ok(ret, "BeginPath error %ld\n", GetLastError());
9535 ret = MoveToEx(hdcMetafile, 50, 50, NULL);
9536 ok( ret, "MoveToEx error %ld.\n", GetLastError());
9537 ret = LineTo(hdcMetafile, 50, 150);
9538 ok( ret, "LineTo error %ld.\n", GetLastError());
9539 ret = LineTo(hdcMetafile, 150, 150);
9540 ok( ret, "LineTo error %ld.\n", GetLastError());
9541 ret = LineTo(hdcMetafile, 150, 50);
9542 ok( ret, "LineTo error %ld.\n", GetLastError());
9543 ret = LineTo(hdcMetafile, 50, 50);
9544 ok( ret, "LineTo error %ld.\n", GetLastError());
9545 Rectangle(hdcMetafile, 10, 10, 20, 20);
9546 Arc(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21);
9547 ArcTo(hdcMetafile, 23, 23, 37, 27, 37, 27, 23, 23);
9548 Chord(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21);
9549 Pie(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21);
9550 Ellipse(hdcMetafile, 10, 10, 20, 20);
9551 RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5);
9552 Polyline(hdcMetafile, pts, 4);
9553 PolylineTo(hdcMetafile, pts, 4);
9554 PolyPolyline(hdcMetafile, pts, counts, 2);
9555 PolyDraw(hdcMetafile, pts, types, 9);
9556 AngleArc(hdcMetafile, 37, 36, 23, 90, 180);
9557 ret = EndPath(hdcMetafile);
9558 ok(ret, "EndPath failed: %lu\n", GetLastError());
9559
9560 size = GetPath(hdcMetafile, NULL, NULL, 0);
9561 ok( size == 112, "GetPath returned %d.\n", size);
9562
9563 /* EndPath with no open path is recorded, but fails */
9564 ret = EndPath(hdcMetafile);
9565 ok(!ret, "EndPath succeeded\n");
9566
9567 ret = StrokeAndFillPath( hdcMetafile );
9568 ok( ret, "StrokeAndFillPath failed err %ld\n", GetLastError() );
9569 ret = StrokeAndFillPath( hdcMetafile );
9570 ok( !ret, "StrokeAndFillPath succeeded\n" );
9571
9572 hemf = CloseEnhMetaFile(hdcMetafile);
9573 ok(hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
9574
9575 if (compare_emf_bits(hemf, EMF_PATH_BITS, sizeof(EMF_PATH_BITS), "test_emf_paths", FALSE) != 0)
9576 {
9577 dump_emf_bits(hemf, "test_emf_paths");
9578 dump_emf_records(hemf, "test_emf_paths");
9579 }
9580
9581 DeleteEnhMetaFile(hemf);
9582
9583 SetLastError(0xdeadbeef);
9584 hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
9585 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
9586
9587 ret = BeginPath(hdcMetafile);
9588 ok( ret, "BeginPath failed error %ld\n", GetLastError() );
9589 ret = CloseFigure(hdcMetafile);
9590 ok( ret, "CloseFigure failed error %ld\n", GetLastError() );
9591 ret = BeginPath(hdcMetafile);
9592 ok( ret, "BeginPath failed error %ld\n", GetLastError() );
9593 ret = EndPath(hdcMetafile);
9594 ok( ret, "EndPath failed error %ld\n", GetLastError() );
9595 ret = EndPath(hdcMetafile);
9596 ok( !ret, "EndPath succeeded\n" );
9597 ret = CloseFigure(hdcMetafile);
9598 ok( !ret, "CloseFigure succeeded\n" );
9599 ret = BeginPath(hdcMetafile);
9600 ok( ret, "BeginPath failed error %ld\n", GetLastError() );
9601 ret = AbortPath(hdcMetafile);
9602 ok( ret, "AbortPath failed error %ld\n", GetLastError() );
9603 ret = AbortPath(hdcMetafile);
9604 ok( ret, "AbortPath failed error %ld\n", GetLastError() );
9605
9606 hemf = CloseEnhMetaFile(hdcMetafile);
9607 ok(hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
9608
9609 if (compare_emf_bits(hemf, EMF_EMPTY_PATH_BITS, sizeof(EMF_EMPTY_PATH_BITS), "empty path", FALSE) != 0)
9610 {
9611 dump_emf_bits(hemf, "empty path");
9612 dump_emf_records(hemf, "empty path");
9613 }
9614
9615 DeleteEnhMetaFile(hemf);
9616}
9617
9618static void test_emf_PolyPolyline(void)
9619{
9620 HDC hdcMetafile;
9621 HENHMETAFILE hemf;
9622 POINT pts[4] = {{10, 20}, {100, 200}, {0x9000,300}, {400, 500}};
9623 DWORD counts[2];
9624 BOOL ret;
9625
9626 SetLastError(0xdeadbeef);
9627 hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
9628 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
9629
9630 ret = PolyPolyline(hdcMetafile, NULL, NULL, 0);
9631 ok( !ret, "PolyPolyline\n" );
9632
9633 SetLastError( 0xdeadbeef );
9634 counts[0] = 0;
9635 counts[1] = 1;
9636 ret = PolyPolyline(hdcMetafile, pts, counts, 2);
9637 ok( !ret, "PolyPolyline\n" );
9638 ok( GetLastError() == ERROR_INVALID_PARAMETER, "gle %ld\n", GetLastError() );
9639
9640 SetLastError( 0xdeadbeef );
9641 counts[0] = 1;
9642 counts[1] = 1;
9643 ret = PolyPolyline(hdcMetafile, pts, counts, 2);
9644 ok( !ret, "PolyPolyline\n" );
9645 ok( GetLastError() == ERROR_INVALID_PARAMETER, "gle %ld\n", GetLastError() );
9646
9647 SetLastError( 0xdeadbeef );
9648 counts[0] = 2;
9649 counts[1] = 1;
9650 ret = PolyPolyline(hdcMetafile, pts, counts, 2);
9651 ok( !ret, "PolyPolyline\n" );
9652 ok( GetLastError() == ERROR_INVALID_PARAMETER, "gle %ld\n", GetLastError() );
9653
9654 counts[0] = 2;
9655 counts[1] = 2;
9656 ret = PolyPolyline(hdcMetafile, pts, counts, 2);
9657 ok( ret, "PolyPolyline\n" );
9658
9659 hemf = CloseEnhMetaFile(hdcMetafile);
9660 ok(hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
9661
9663 "emf_PolyPolyline", FALSE) != 0)
9664 {
9665 dump_emf_bits(hemf, "emf_PolyPolyline");
9666 dump_emf_records(hemf, "emf_PolyPolyline");
9667 }
9668
9669 DeleteEnhMetaFile(hemf);
9670}
9671
9672static void test_emf_GradientFill(void)
9673{
9674 HDC mf;
9675 HENHMETAFILE hemf;
9676 TRIVERTEX v[] =
9677 {
9678 { 1, 10, 0xff00, 0x8000, 0x0000, 0x8001 },
9679 { 200, 210, 0x0000, 0x0000, 0xff00, 0xff00 },
9680 { 180, 190, 0x1234, 0x5678, 0x9abc, 0xdef0 },
9681 { 300, 310, 0xff00, 0xff00, 0xff00, 0x0000 },
9682 { 400, 410, 0xff00, 0xff00, 0xff00, 0x0000 }
9683 };
9684 GRADIENT_TRIANGLE tri[] = { { 0, 1, 2 }, { 3, 1, 0 } };
9685 BOOL ret;
9686
9687 mf = CreateEnhMetaFileA( GetDC( 0 ), NULL, NULL, NULL );
9688 ok( mf != 0, "CreateEnhMetaFileA error %ld\n", GetLastError() );
9689
9690 /* Don't test the GRADIENT_FILL_RECT_ modes since a Windows bug
9691 * means it allocates three mesh indices rather than two per
9692 * rectangle. This results in uninitialised values being written
9693 * to the EMF which is rather difficult to test against.
9694 *
9695 * Note also that the final vertex here is not required, yet it is
9696 * written to the EMF, but is not considered in the bounds
9697 * calculation.
9698 */
9699 ret = GdiGradientFill( mf, v, ARRAY_SIZE(v), tri, ARRAY_SIZE(tri), GRADIENT_FILL_TRIANGLE );
9700 ok( ret, "GradientFill\n" );
9701
9702 hemf = CloseEnhMetaFile( mf );
9703 ok( hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError() );
9704
9706 "emf_GradientFill", FALSE ) != 0)
9707 {
9708 dump_emf_bits( hemf, "emf_GradientFill" );
9709 dump_emf_records( hemf, "emf_GradientFill" );
9710 }
9711
9712 DeleteEnhMetaFile( hemf );
9713}
9714
9715static void set_rotation_xform(XFORM *out, float rad, int dx, int dy)
9716{
9717 out->eM11 = cosf(rad);
9718 out->eM12 = -1.f * sinf(rad);
9719 out->eM21 = sinf(rad);
9720 out->eM22 = cosf(rad);
9721 out->eDx = dx;
9722 out->eDy = dy;
9723}
9724
9726{
9727 const char *name;
9728
9731
9734 XFORM stored; /* this is the "hidden" world transform used in PlayEnhMetaFileRecord */
9735};
9736
9737static BOOL xform_eq(const XFORM *a, const XFORM *b)
9738{
9739 return fabs(a->eM11 - b->eM11) < 0.001f &&
9740 fabs(a->eM12 - b->eM12) < 0.001f &&
9741 fabs(a->eM21 - b->eM21) < 0.001f &&
9742 fabs(a->eM22 - b->eM22) < 0.001f &&
9743 fabs(a->eDx - b->eDx) < 0.001f &&
9744 fabs(a->eDy - b->eDy) < 0.001f;
9745}
9746
9748 const ENHMETARECORD *emr, INT nobj, LPARAM param)
9749{
9750 XFORM xform = {0};
9752 BOOL ret;
9753
9754 switch(emr->iType)
9755 {
9757 {
9758 const EMRSETWORLDTRANSFORM *lpXfrm = (const EMRSETWORLDTRANSFORM *)emr;
9759
9760 /* get scale factors with an identity world transform */
9762
9763 /* play back record */
9764 ret = PlayEnhMetaFileRecord(hdc, ht, emr, nobj);
9765 ok(ret == TRUE, "%s: PlayEnhMetaFileRecord failed\n", test_data->name);
9766
9767 test_data->stored = lpXfrm->xform;
9768 CombineTransform(&test_data->expected, &test_data->stored, &test_data->scale);
9769
9770 /* verify it is updated immediately */
9771 ret = GetWorldTransform(hdc, &xform);
9772 ok(ret == TRUE, "%s: GetWorldTransform failed\n", test_data->name);
9773 ok(xform_eq(&xform, &test_data->expected),
9774 "%s: After SWT playback, got wrong world transform: %f, %f; %f %f; %f %f; expected: %f, %f; %f %f; %f %f\n",
9775 test_data->name,
9776 xform.eM11, xform.eM12,
9777 xform.eM21, xform.eM22,
9778 xform.eDx, xform.eDy,
9779 test_data->expected.eM11, test_data->expected.eM12,
9780 test_data->expected.eM21, test_data->expected.eM22,
9781 test_data->expected.eDx, test_data->expected.eDy);
9782
9783 break;
9784 }
9785
9787 {
9788 const EMRMODIFYWORLDTRANSFORM *lpXfrm = (const EMRMODIFYWORLDTRANSFORM *)emr;
9789
9790 /* transform persists across calls */
9791 ret = GetWorldTransform(hdc, &xform);
9792 ok(ret == TRUE, "%s: GetWorldTransform failed\n", test_data->name);
9793 ok(xform_eq(&xform, &test_data->expected),
9794 "%s: On MWT entry, got wrong world transform: %f, %f; %f %f; %f %f; expected: %f, %f; %f %f; %f %f\n",
9795 test_data->name,
9796 xform.eM11, xform.eM12,
9797 xform.eM21, xform.eM22,
9798 xform.eDx, xform.eDy,
9799 test_data->expected.eM11, test_data->expected.eM12,
9800 test_data->expected.eM21, test_data->expected.eM22,
9801 test_data->expected.eDx, test_data->expected.eDy);
9802
9803 if(test_data->do_playback)
9804 {
9805 /* play back record */
9806 ret = PlayEnhMetaFileRecord(hdc, ht, emr, nobj);
9807 ok(ret == TRUE, "%s: PlayEnhMetaFileRecord failed\n", test_data->name);
9808
9809 if(lpXfrm->iMode == MWT_LEFTMULTIPLY)
9810 {
9811 /* left multiply does not discard direct modifications */
9812 CombineTransform(&test_data->expected, &lpXfrm->xform, &test_data->expected);
9813
9814 /* and updates the stored matrix separately */
9815 CombineTransform(&test_data->stored, &lpXfrm->xform, &test_data->stored);
9816
9817 }
9818 else if(lpXfrm->iMode == MWT_RIGHTMULTIPLY)
9819 {
9820 /* but right multiply does discard */
9821 CombineTransform(&test_data->stored, &test_data->stored, &lpXfrm->xform);
9822
9823 CombineTransform(&test_data->expected, &test_data->stored, &test_data->scale);
9824 }
9825 else if(lpXfrm->iMode == MWT_IDENTITY)
9826 {
9827 /* reset to identity matrix also does discard */
9828 test_data->stored.eM11 = 1.0f;
9829 test_data->stored.eM12 = 0.0f;
9830 test_data->stored.eM21 = 0.0f;
9831 test_data->stored.eM22 = 1.0f;
9832 test_data->stored.eDx = 0.0f;
9833 test_data->stored.eDy = 0.0f;
9834
9835 CombineTransform(&test_data->expected, &test_data->stored, &test_data->scale);
9836 }
9837
9838 /* verify it is updated immediately */
9839 ret = GetWorldTransform(hdc, &xform);
9840 ok(ret == TRUE, "%s: GetWorldTransform failed\n", test_data->name);
9841 ok(xform_eq(&xform, &test_data->expected),
9842 "%s: After MWT playback, got wrong world transform: %f, %f; %f %f; %f %f; expected: %f, %f; %f %f; %f %f\n",
9843 test_data->name,
9844 xform.eM11, xform.eM12,
9845 xform.eM21, xform.eM22,
9846 xform.eDx, xform.eDy,
9847 test_data->expected.eM11, test_data->expected.eM12,
9848 test_data->expected.eM21, test_data->expected.eM22,
9849 test_data->expected.eDx, test_data->expected.eDy);
9850 }
9851
9852 if(test_data->do_modify)
9853 {
9854 /* modify directly */
9855 set_rotation_xform(&xform, M_PI / 4.f, 1, -1);
9857 ok(ret == TRUE, "%s: ModifyWorldTransform failed\n", test_data->name);
9858
9859 /* the modified transform persists across callback calls */
9860 CombineTransform(&test_data->expected, &xform, &test_data->expected);
9861
9862 ret = GetWorldTransform(hdc, &xform);
9863 ok(ret == TRUE, "%s: GetWorldTransform failed\n", test_data->name);
9864 ok(xform_eq(&xform, &test_data->expected),
9865 "%s: After ModifyWT, got wrong world transform: %f, %f; %f %f; %f %f; expected: %f, %f; %f %f; %f %f\n",
9866 test_data->name,
9867 xform.eM11, xform.eM12,
9868 xform.eM21, xform.eM22,
9869 xform.eDx, xform.eDy,
9870 test_data->expected.eM11, test_data->expected.eM12,
9871 test_data->expected.eM21, test_data->expected.eM22,
9872 test_data->expected.eDx, test_data->expected.eDy);
9873 }
9874
9875 break;
9876 }
9877
9878 case EMR_LINETO:
9879 ret = GetWorldTransform(hdc, &xform);
9880 ok(ret == TRUE, "%s: GetWorldTransform failed\n", test_data->name);
9881 ok(xform_eq(&xform, &test_data->expected),
9882 "%s: Before LINETO playback, got wrong world transform: %f, %f; %f %f; %f %f; expected: %f, %f; %f %f; %f %f\n",
9883 test_data->name,
9884 xform.eM11, xform.eM12,
9885 xform.eM21, xform.eM22,
9886 xform.eDx, xform.eDy,
9887 test_data->expected.eM11, test_data->expected.eM12,
9888 test_data->expected.eM21, test_data->expected.eM22,
9889 test_data->expected.eDx, test_data->expected.eDy);
9890
9891 ret = PlayEnhMetaFileRecord(hdc, ht, emr, nobj);
9892 ok(ret == TRUE, "%s: PlayEnhMetaFileRecord failed\n", test_data->name);
9893
9894 /* transform doesn't change during LINETO playback */
9895 ret = GetWorldTransform(hdc, &xform);
9896 ok(ret == TRUE, "%s: GetWorldTransform failed\n", test_data->name);
9897 ok(xform_eq(&xform, &test_data->expected),
9898 "%s: After LINETO playback, got wrong world transform: %f, %f; %f %f; %f %f; expected: %f, %f; %f %f; %f %f\n",
9899 test_data->name,
9900 xform.eM11, xform.eM12,
9901 xform.eM21, xform.eM22,
9902 xform.eDx, xform.eDy,
9903 test_data->expected.eM11, test_data->expected.eM12,
9904 test_data->expected.eM21, test_data->expected.eM22,
9905 test_data->expected.eDx, test_data->expected.eDy);
9906
9907 break;
9908
9909 default:
9910 PlayEnhMetaFileRecord(hdc, ht, emr, nobj);
9911 break;
9912 }
9913
9914 return 1;
9915}
9916
9918{
9919 HDC hdcMetafile, hdc;
9920 HWND hwnd;
9921 HENHMETAFILE hemf;
9922 XFORM xform;
9923 BOOL ret;
9924 RECT rect = { 0, 0, 100, 100 };
9925 int i;
9927 { "normal", FALSE, TRUE },
9928 { "playback and modify", TRUE, TRUE },
9929 { "manual modify", TRUE, FALSE }
9930 };
9931
9932 for(i = 0; i < ARRAY_SIZE(test_data); ++i)
9933 {
9934 hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
9935 ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError());
9936
9937 ret = SetGraphicsMode(hdcMetafile, GM_ADVANCED);
9938 ok(ret == TRUE, "SetGraphicsMode failed\n");
9939
9940 set_rotation_xform(&xform, M_PI / 4.f, 2, 3);
9941 ret = SetWorldTransform(hdcMetafile, &xform); /* EMR_SETWORLDTRANSFORM */
9942 ok(ret == TRUE, "SetWorldTransform failed\n");
9943
9944 ret = ModifyWorldTransform(hdcMetafile, NULL, MWT_IDENTITY); /* EMR_MODIFYWORLDTRANSFORM */
9945 ok(ret == TRUE, "ModifyWorldTransform failed\n");
9946
9947 set_rotation_xform(&xform, M_PI / 2.f, -2, -3);
9948 ret = ModifyWorldTransform(hdcMetafile, &xform, MWT_LEFTMULTIPLY); /* EMR_MODIFYWORLDTRANSFORM */
9949 ok(ret == TRUE, "ModifyWorldTransform failed\n");
9950
9951 set_rotation_xform(&xform, M_PI / 3.f, -2, 3);
9952 ret = ModifyWorldTransform(hdcMetafile, &xform, MWT_LEFTMULTIPLY); /* EMR_MODIFYWORLDTRANSFORM */
9953 ok(ret == TRUE, "ModifyWorldTransform failed\n");
9954
9955 set_rotation_xform(&xform, M_PI, 2, -3);
9956 ret = ModifyWorldTransform(hdcMetafile, &xform, MWT_RIGHTMULTIPLY); /* EMR_MODIFYWORLDTRANSFORM */
9957 ok(ret == TRUE, "ModifyWorldTransform failed\n");
9958
9959 ret = LineTo(hdcMetafile, 1, 1);
9960 ok(ret == TRUE, "LineTo failed\n");
9961
9962 hemf = CloseEnhMetaFile(hdcMetafile);
9963 ok(hemf != 0, "CloseEnhMetaFile error %ld\n", GetLastError());
9964
9965 hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
9966 0, 0, 200, 200, 0, 0, 0, NULL);
9967 ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError());
9968
9969 hdc = GetDC(hwnd);
9970 ok(hdc != 0, "GetDC failed\n");
9971
9973 ok(ret == TRUE, "EnumEnhMetaFile failed: %lu\n", GetLastError());
9974
9975 ReleaseDC(hwnd, hdc);
9977
9978 DeleteEnhMetaFile(hemf);
9979 }
9980}
9981
9982static const unsigned char EMF_ALPHABLEND_1BIT[] =
9983{
9984 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
9985 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9986 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
9987 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9988 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
9989 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
9990 0x90, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
9991 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9993 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
9994 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
9995 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9996 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
9997 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
9998 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9999 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10000 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10001 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10002 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10003 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10004 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10005 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10006 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10007 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10008 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10009 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10010 0x72, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00,
10011 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10012 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10014 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10015 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10016 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10017 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10018 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10019 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10020 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10021 0x30, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00,
10022 0x10, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10023 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10024 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10025 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
10026 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10027 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10028 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10029 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10031 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
10032 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10033 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
10034};
10035
10036static const unsigned char EMF_ALPHABLEND_4BIT[] =
10037{
10038 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10039 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10040 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10041 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10042 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10043 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10044 0xc8, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10045 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10046 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10047 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10048 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10049 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10050 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
10051 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10052 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10053 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10054 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10055 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10056 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10057 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10058 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10059 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10060 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10061 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10062 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10063 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10064 0x72, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
10065 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10066 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10067 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10068 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10069 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10070 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10071 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10072 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10073 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10074 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10075 0x68, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00,
10076 0x10, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10077 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10078 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10079 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
10080 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10081 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10082 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10083 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10084 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10085 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10086 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10087 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10088 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10089 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10091 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10092 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
10093 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10094 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
10095};
10096
10097static const unsigned char EMF_ALPHABLEND_8BIT[] =
10098{
10099 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10101 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10103 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10104 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10105 0x88, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10106 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10108 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10109 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10111 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
10112 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10113 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10114 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10115 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10116 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10117 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10118 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10119 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10120 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10122 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10123 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10124 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10125 0x72, 0x00, 0x00, 0x00, 0xa4, 0x04, 0x00, 0x00,
10126 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10127 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10129 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10130 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10131 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10133 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10134 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10135 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10136 0x28, 0x04, 0x00, 0x00, 0x94, 0x04, 0x00, 0x00,
10137 0x10, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10138 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10139 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10140 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
10141 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10143 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10147 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10148 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10149 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10150 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10155 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10158 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10160 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10161 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10163 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10164 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10166 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10171 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10186 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10191 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10194 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10195 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10196 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10197 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10203 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10204 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10205 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10206 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10207 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10216 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10217 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10219 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10221 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10230 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10231 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10237 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10242 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10243 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10245 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10247 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10249 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10252 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10253 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10255 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10258 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10259 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10260 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10265 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10266 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10267 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10268 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10271 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10272 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10273 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
10274 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10275 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
10276};
10277
10278static const unsigned char EMF_ALPHABLEND_16BIT[] =
10279{
10280 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10281 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10282 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10284 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10285 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10286 0xa4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10287 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10288 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10289 0xc0, 0x03, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10290 0xfe, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10291 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10292 0x00, 0x00, 0x00, 0x00, 0x30, 0xe0, 0x03, 0x00,
10293 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10294 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10295 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10296 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10297 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10298 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10299 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10300 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10305 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10306 0x72, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
10307 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10308 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10309 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10310 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10311 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10312 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10313 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10314 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10315 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10316 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10317 0x34, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00,
10318 0x20, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10319 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10320 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10321 0x01, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
10322 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10323 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10324 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
10325 0xe0, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
10326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10327 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10330 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
10331 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
10332 0x14, 0x00, 0x00, 0x00
10333};
10334
10335static const unsigned char EMF_ALPHABLEND_16BIT_555[] =
10336{
10337 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10339 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10341 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10342 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10343 0xa4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10344 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10345 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10346 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10347 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10349 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
10350 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10351 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10352 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10353 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10354 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10355 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10356 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10357 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10358 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10359 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10361 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10363 0x72, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
10364 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10365 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10366 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10367 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10368 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10369 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10371 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10372 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10373 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10374 0x34, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00,
10375 0x20, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10376 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10377 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10378 0x01, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
10379 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10380 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10381 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
10382 0xe0, 0x03, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
10383 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10384 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10385 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10387 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
10388 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
10389 0x14, 0x00, 0x00, 0x00
10390};
10391
10392static const unsigned char EMF_ALPHABLEND_24BIT[] =
10393{
10394 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10395 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10396 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10397 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10398 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10399 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10400 0xa8, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10401 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10403 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10404 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10406 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
10407 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10408 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10409 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10410 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10411 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10412 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10413 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10414 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10418 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10419 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10420 0x72, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00,
10421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10422 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10424 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10425 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10426 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10428 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10429 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10430 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10431 0x28, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00,
10432 0x30, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10433 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10434 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10435 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
10436 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10437 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10438 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10439 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10440 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10441 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10442 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10444 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
10445 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10446 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
10447};
10448
10449static const unsigned char EMF_ALPHABLEND_32BIT_888[] =
10450{
10451 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10453 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10455 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10456 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10457 0xc4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10458 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10459 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10460 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10461 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10463 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
10464 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10465 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10466 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10467 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10468 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10469 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10471 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10472 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10473 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10474 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10475 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10476 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10477 0x72, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
10478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10479 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10481 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10482 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10483 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10484 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10485 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10486 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10487 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10488 0x34, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00,
10489 0x40, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10490 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10491 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10492 0x01, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
10493 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10494 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10495 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
10496 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
10497 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10498 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10500 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10501 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10502 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10503 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10504 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10505 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
10506 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
10507 0x14, 0x00, 0x00, 0x00
10508};
10509
10510static const unsigned char EMF_ALPHABLEND_32BIT[] =
10511{
10512 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10513 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10514 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10515 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10516 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
10517 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
10518 0xc4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10519 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10520 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10521 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
10522 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
10523 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10524 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
10525 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
10526 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10527 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10528 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10529 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10530 0x04, 0x00, 0x00, 0x00, 0x62, 0x00, 0xff, 0x00,
10531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10532 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
10533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
10534 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10535 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10536 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10537 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10538 0x72, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
10539 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10540 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
10541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10542 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10543 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
10544 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0xa3, 0x3b,
10545 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10546 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
10547 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
10548 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
10549 0x34, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00,
10550 0x40, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
10551 0x90, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
10552 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
10553 0x01, 0x00, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00,
10554 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10555 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
10557 0xe0, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
10558 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10559 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10560 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10561 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10562 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10563 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10564 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10565 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10566 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
10567 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
10568 0x14, 0x00, 0x00, 0x00
10569};
10570
10571static void test_emf_AlphaBlend(void)
10572{
10573 static const XFORM xform = {0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f};
10574 static const BLENDFUNCTION blend = {AC_SRC_OVER, 0, 128, 0};
10575 static const int bitmap_width = 4, bitmap_height = 4;
10576#ifdef __REACTOS__
10577 unsigned char bmi_buffer[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)];
10578#else
10579 unsigned char bmi_buffer[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
10580#endif
10581 BITMAPINFO *bmi = (BITMAPINFO *)bmi_buffer;
10582 HDC hdc, hdc_emf, hdc_emf2, hdc_bitmap;
10583 HBITMAP hbitmap, old_hbitmap;
10584 HENHMETAFILE hemf, hemf2;
10585 int ret, test_idx;
10586 char comment[64];
10587 void *bits;
10588
10589 static const struct
10590 {
10591 WORD bpp;
10593 const void *bits;
10594 size_t bits_count;
10595 DWORD used_color_count;
10596 DWORD color_count;
10597 RGBQUAD colors[3];
10598 }
10599 tests[] =
10600 {
10601 {1, BI_RGB, EMF_ALPHABLEND_1BIT, sizeof(EMF_ALPHABLEND_1BIT), 1, 1, {{0xff, 0xff, 0xff}}},
10602 {4, BI_RGB, EMF_ALPHABLEND_4BIT, sizeof(EMF_ALPHABLEND_4BIT), 1, 1, {{0xff, 0xff, 0xff}}},
10603 {8, BI_RGB, EMF_ALPHABLEND_8BIT, sizeof(EMF_ALPHABLEND_8BIT), 1, 1, {{0xff, 0xff, 0xff}}},
10607 {16, BI_BITFIELDS, EMF_ALPHABLEND_16BIT, sizeof(EMF_ALPHABLEND_16BIT), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
10608 {32, BI_BITFIELDS, EMF_ALPHABLEND_32BIT, sizeof(EMF_ALPHABLEND_32BIT), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
10609 };
10610
10611 hdc = GetDC(0);
10612
10613 /* Test that source DC cannot be an enhanced metafile */
10614 hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
10615 ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
10616 hdc_emf2 = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
10617 ok(!!hdc_emf2, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
10618
10619 ret = GdiAlphaBlend(hdc_emf, 0, 0, 1, 1, hdc_emf2, 0, 0, 1, 1, blend);
10620 ok(!ret, "GdiAlphaBlend succeeded\n");
10621
10622 hemf2 = CloseEnhMetaFile(hdc_emf2);
10623 ok(!!hemf2, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
10624 hemf = CloseEnhMetaFile(hdc_emf);
10625 ok(!!hemf, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
10626 DeleteEnhMetaFile(hemf2);
10627 DeleteEnhMetaFile(hemf);
10628
10629 /* Test AlphaBlend with different format of bitmaps */
10630 for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx)
10631 {
10632 memset(bmi_buffer, 0, sizeof(bmi_buffer));
10633 bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
10634 bmi->bmiHeader.biHeight = bitmap_width;
10635 bmi->bmiHeader.biWidth = bitmap_height;
10636 bmi->bmiHeader.biBitCount = tests[test_idx].bpp;
10637 bmi->bmiHeader.biPlanes = 1;
10638 bmi->bmiHeader.biCompression = tests[test_idx].compression;
10639 bmi->bmiHeader.biClrUsed = tests[test_idx].used_color_count;
10640 memcpy(bmi->bmiColors, tests[test_idx].colors, sizeof(RGBQUAD) * tests[test_idx].color_count);
10641
10643 ok(!!hbitmap, "Test %d: CreateDIBSection failed, error %ld\n", test_idx, GetLastError());
10644 hdc_bitmap = CreateCompatibleDC(hdc);
10645 ok(!!hdc_bitmap, "Test %d: CreateCompatibleDC failed, error %ld\n", test_idx, GetLastError());
10646 old_hbitmap = SelectObject(hdc_bitmap, hbitmap);
10647
10648 SetBkColor(hdc_bitmap, RGB(0xff, 0xff, 0xff));
10649 ret = SetGraphicsMode(hdc_bitmap, GM_ADVANCED);
10650 ok(ret, "Test %d: SetGraphicsMode failed, error %ld\n", test_idx, GetLastError());
10651 ret = SetWorldTransform(hdc_bitmap, &xform);
10652 ok(ret, "Test %d: SetWorldTransform failed, error %ld\n", test_idx, GetLastError());
10653 ret = SetMapMode(hdc_bitmap, MM_ANISOTROPIC);
10654 ok(ret, "Test %d: SetMapMode failed, error %ld\n", test_idx, GetLastError());
10655 ret = SetWindowOrgEx(hdc_bitmap, 0, 0, NULL);
10656 ok(ret, "Test %d: SetWindowOrgEx failed, error %ld\n", test_idx, GetLastError());
10657 ret = SetWindowExtEx(hdc_bitmap, 400, 400, NULL);
10658 ok(ret, "Test %d: SetWindowExtEx failed, error %ld\n", test_idx, GetLastError());
10659 ret = SetViewportOrgEx(hdc_bitmap, 0, 0, NULL);
10660 ok(ret, "Test %d: SetViewportOrgEx failed, error %ld\n", test_idx, GetLastError());
10661 ret = SetViewportExtEx(hdc_bitmap, bitmap_width, bitmap_height, NULL);
10662 ok(ret, "Test %d: SetViewportExtEx failed, error %ld\n", test_idx, GetLastError());
10663
10664 hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
10665 ok(!!hdc_emf, "Test %d: CreateEnhMetaFileW failed, error %ld\n", test_idx, GetLastError());
10666
10667 ret = BitBlt(hdc_emf, 0, 0, bitmap_width, bitmap_height, 0, 0, 0, WHITENESS);
10668 ok(ret, "Test %d: BitBlt failed, error %ld\n", test_idx, GetLastError());
10669 ret = BitBlt(hdc_bitmap, 0, 0, bitmap_width, bitmap_height, 0, 0, 0, BLACKNESS);
10670 ok(ret, "Test %d: BitBlt failed, error %ld\n", test_idx, GetLastError());
10671 ret = GdiAlphaBlend(hdc_emf, 0, 0, bitmap_width, bitmap_height, hdc_bitmap, 0, 0, 400, 400, blend);
10672 ok(ret, "Test %d: GdiAlphaBlend failed, error %ld\n", test_idx, GetLastError());
10673
10674 hemf = CloseEnhMetaFile(hdc_emf);
10675 ok(!!hemf, "Test %d: CloseEnhMetaFile failed, %ld\n", test_idx, GetLastError());
10676
10677 sprintf(comment, "test_emf_AlphaBlend() test %d", test_idx);
10678 ret = compare_emf_bits(hemf, tests[test_idx].bits, tests[test_idx].bits_count, comment, FALSE);
10679 if (ret)
10680 {
10681 dump_emf_bits(hemf, comment);
10683 }
10684
10685 DeleteEnhMetaFile(hemf);
10686 SelectObject(hdc_bitmap, old_hbitmap);
10687 DeleteDC(hdc_bitmap);
10689 }
10690
10691 ReleaseDC(0, hdc);
10692}
10693
10694static void test_emf_text_extents(void)
10695{
10696 static const XFORM xform = {0.5f, 0.0f, 0.0f, 0.5f, 0.0f, 0.0f};
10697 HFONT font, old_font, old_font2;
10698 LOGFONTW logfont = {0};
10699 HENHMETAFILE emf;
10700 SIZE size, size2;
10701 HDC dc, emf_dc;
10702 BOOL ret;
10703
10704 dc = GetDC(0);
10705 emf_dc = CreateEnhMetaFileW(dc, NULL, NULL, NULL);
10706 ok(!!emf_dc, "CreateEnhMetaFileW failed, error %ld\n", GetLastError());
10707
10708 logfont.lfWeight = FW_NORMAL;
10709 logfont.lfHeight = 20;
10710 lstrcpyW(logfont.lfFaceName, L"Tahoma");
10711 font = CreateFontIndirectW(&logfont);
10712 ok(!!font, "CreateFontIndirectW failed, error %ld\n", GetLastError());
10713
10714 old_font = SelectObject(dc, font);
10715 old_font2 = SelectObject(emf_dc, font);
10716
10718 ok(ret, "SetGraphicsMode failed, error %ld\n", GetLastError());
10719 ret = SetGraphicsMode(emf_dc, GM_ADVANCED);
10720 ok(ret, "SetGraphicsMode failed, error %ld\n", GetLastError());
10721
10723 ok(ret, "ModifyWorldTransform failed, error %ld\n", GetLastError());
10724 ret = ModifyWorldTransform(emf_dc, &xform, MWT_RIGHTMULTIPLY);
10725 ok(ret, "ModifyWorldTransform failed, error %ld\n", GetLastError());
10726
10727 ret = GetTextExtentPoint32W(dc, L"W", 1, &size);
10728 ok(ret, "GetTextExtentPoint32W failed, error %ld\n", GetLastError());
10729 ret = GetTextExtentPoint32W(emf_dc, L"W", 1, &size2);
10730 ok(ret, "GetTextExtentPoint32W failed, error %ld\n", GetLastError());
10731 ok(size2.cx == size.cx && size2.cy == size.cy, "Expected size %ldx%ld, got %ldx%ld\n",
10732 size.cx, size.cy, size2.cx, size2.cy);
10733
10734 SelectObject(emf_dc, old_font2);
10735 SelectObject(dc, old_font);
10737 emf = CloseEnhMetaFile(emf_dc);
10738 ok(!!emf, "CloseEnhMetaFile failed, error %ld\n", GetLastError());
10740 ReleaseDC(0, dc);
10741}
10742
10743static const unsigned char MF_SETLAYOUT_BITS[] =
10744{
10745/* Winedump output. Note that there is no META_SELECTOBJECT records after META_SETLAYOUT.
10746 *
10747 * METAHEADER 00000012
10748 * type 1 header_size 0x12 version 0x300 size 0x54 object_count 0 max_record_size 0xa parameter_count 0
10749 * 0001 0009 0300 002a 0000 0000 0005 0000
10750 * 0000
10751 * META_SETLAYOUT 0000000a
10752 * 0000 0000
10753 * META_SETLAYOUT 0000000a
10754 * 0001 0000
10755 * META_SETLAYOUT 0000000a
10756 * 0008 0000
10757 * META_SETLAYOUT 0000000a
10758 * 0000 8000
10759 * META_SETLAYOUT 0000000a
10760 * 0009 0000
10761 * META_SETLAYOUT 0000000a
10762 * 0001 8000
10763 * META_EOF 00000006
10764 */
10765 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x2a, 0x00,
10766 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
10767 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x49, 0x01,
10768 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
10769 0x49, 0x01, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00,
10770 0x00, 0x00, 0x49, 0x01, 0x08, 0x00, 0x00, 0x00,
10771 0x05, 0x00, 0x00, 0x00, 0x49, 0x01, 0x00, 0x00,
10772 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x49, 0x01,
10773 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
10774 0x49, 0x01, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00,
10775 0x00, 0x00, 0x00, 0x00
10776};
10777
10778static void test_mf_SetLayout(void)
10779{
10780 static const DWORD tests[] =
10781 {
10782 LAYOUT_LTR,
10783 LAYOUT_RTL,
10788 };
10789 DWORD layout;
10790 HMETAFILE mf;
10791 int ret, i;
10792 HDC mf_dc;
10793
10794 mf_dc = CreateMetaFileW(NULL);
10795 ok(!!mf_dc, "CreateMetaFileW failed, error %ld\n", GetLastError());
10796
10797 for (i = 0; i < ARRAY_SIZE(tests); ++i)
10798 {
10799 winetest_push_context("Test %d", i);
10800 layout = SetLayout(mf_dc, tests[i]);
10801 ok(layout == LAYOUT_RTL, "Expected %#lx, got %#lx\n", tests[i], layout);
10802 layout = GetLayout(mf_dc);
10803 ok(layout == GDI_ERROR, "Expected %#x, got %#lx\n", GDI_ERROR, layout);
10805 }
10806
10807 mf = CloseMetaFile(mf_dc);
10808 ok(!!mf, "CloseMetaFile failed, error %ld\n", GetLastError());
10809
10810 ret = compare_mf_bits(mf, MF_SETLAYOUT_BITS, sizeof(MF_SETLAYOUT_BITS), "mf_SetLayout");
10811 ok(!ret, "Bits mismatch\n");
10812 if (ret)
10813 {
10814 dump_mf_bits(mf, "mf_SetLayout");
10815 EnumMetaFile(0, mf, mf_enum_proc, 0);
10816 }
10817
10818 DeleteMetaFile(mf);
10819}
10820
10822{
10824
10825 /* For enhanced metafiles (enhmfdrv) */
10828 test_SaveDC();
10844 test_emf_blit();
10850
10851 /* For win-format metafiles (mfdrv) */
10853 test_mf_Blank();
10867 test_mf_attrs();
10870 test_mf_blit();
10872
10873 /* For metafile conversions */
10877
10878 test_gdiis();
10880}
static HRGN hrgn
static HBITMAP hbitmap
static POBJECT_TYPE GetObjectType(IN PCWSTR TypeName)
Definition: ObTypes.c:15
HDC hdc2
Definition: SelectObject.c:10
VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
Definition: bootvid.c:52
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define broken(x)
Definition: atltest.h:178
#define START_TEST(x)
Definition: atltest.h:75
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define msg(x)
Definition: auth_time.c:54
struct _RGNDATAHEADER RGNDATAHEADER
#define WINDING
Definition: constants.h:279
#define ALTERNATE
Definition: constants.h:278
HFONT hFont
Definition: main.c:53
#define ARRAY_SIZE(A)
Definition: main.h:20
#define ULongToHandle(h)
Definition: basetsd.h:75
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
Definition: blt.cpp:2
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
Definition: btrfs_drv.h:1365
Definition: arc.h:55
RECT rect
Definition: combotst.c:67
HDC dc
Definition: cylfrac.c:34
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define LF_FACESIZE
Definition: dimm.idl:39
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
DWORD bpp
Definition: surface.c:185
static const WCHAR rc2[]
Definition: oid.c:1216
#define CloseHandle
Definition: compat.h:739
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define OPEN_EXISTING
Definition: compat.h:775
#define ReadFile(a, b, c, d, e)
Definition: compat.h:742
#define SetLastError(x)
Definition: compat.h:752
#define GetProcAddress(x, y)
Definition: compat.h:753
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define CALLBACK
Definition: compat.h:35
#define lstrcpyW
Definition: compat.h:749
#define FILE_SHARE_READ
Definition: compat.h:136
static const WCHAR *const ext[]
Definition: module.c:53
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:1973
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4104
static HDC display_dc
Definition: main.c:41
const WCHAR * text
Definition: package.c:1794
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2802
_ACRTIMP double __cdecl fabs(double)
_ACRTIMP float __cdecl cosf(float)
Definition: cosf.c:13
_ACRTIMP float __cdecl sinf(float)
Definition: sinf.c:13
_ACRTIMP double __cdecl floor(double)
Definition: floor.c:18
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
#define check(expected, result)
Definition: dplayx.c:32
#define pt(x, y)
Definition: drawing.c:79
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
Definition: common.c:42
#define RGB(r, g, b)
Definition: precomp.h:67
ULONG RGBQUAD
Definition: precomp.h:47
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
#define ULONG_PTR
Definition: config.h:101
#define abs(i)
Definition: fconv.c:206
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
Definition: filename.c:26
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:103
for(i=0;i< ARRAY_SIZE(offsets);i++)
pKey DeleteObject()
DWORD WINAPI GetLayout(_In_ HDC hdc)
Definition: coord.c:750
DWORD WINAPI SetLayout(_In_ HDC hdc, _In_ DWORD dwLayout)
Definition: coord.c:780
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: gl.h:1545
GLdouble n
Definition: glext.h:7729
GLuint res
Definition: glext.h:9613
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLuint color
Definition: glext.h:6243
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum mode
Definition: glext.h:6217
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
GLfloat param
Definition: glext.h:5796
GLenum GLsizei len
Definition: glext.h:6722
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLsizei const GLfloat * points
Definition: glext.h:8112
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
static const struct newhuff ht[]
Definition: huffman.h:296
#define FLOAT
Definition: i386-dis.c:525
#define bits
Definition: infblock.c:15
#define c
Definition: ke_i.h:80
GLint dy
Definition: linetemp.h:97
if(dx< 0)
Definition: linetemp.h:194
GLint x0
Definition: linetemp.h:95
GLint y0
Definition: linetemp.h:96
GLint dx
Definition: linetemp.h:97
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define M_PI
Definition: macros.h:263
HDC hdcOffscreen
Definition: magnifier.c:52
int winetest_debug
#define win_skip
Definition: minitest.h:67
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
Definition: test.h:537
#define todo_wine
Definition: minitest.h:80
LONG_PTR LPARAM
Definition: minwindef.h:175
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define BI_BITFIELDS
Definition: mmreg.h:507
static struct test_info tests[]
#define sprintf
Definition: sprintf.c:45
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
HDC hdc
Definition: main.c:9
BOOL WINAPI GdiGradientFill(HDC hdc, TRIVERTEX *vert_array, ULONG nvert, void *grad_array, ULONG ngrad, ULONG mode)
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
#define comment(fmt, arg1)
Definition: rebar.c:847
static char org[]
Definition: encode.c:7395
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1204
#define LAYOUT_LTR
Definition: dc.c:33
static HMODULE hgdi32
Definition: font.c:50
#define near_match(a, b)
Definition: font.c:39
static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_4X4_SIZED[]
Definition: metafile.c:7449
static void test_emf_text_extents(void)
Definition: metafile.c:10694
static void test_mf_blit(void)
Definition: metafile.c:4910
static const unsigned char EMF_EMPTY_BITS[]
Definition: metafile.c:8064
static const unsigned char EMF_STRETCHDIBITS_16BIT_555_4X4_SIZED[]
Definition: metafile.c:6135
static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_4X4_NOSIZE[]
Definition: metafile.c:7412
static const unsigned char MF_LINETO_BITS[]
Definition: metafile.c:1181
static const unsigned char MF_PATH_BITS[]
Definition: metafile.c:8621
static void dump_mf_bits(const HMETAFILE mf, const char *desc)
Definition: metafile.c:2052
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_4X4_NOSIZE[]
Definition: metafile.c:7812
static const unsigned char EMF_STRETCHDIBITS_16BIT_555_3X3_SIZED[]
Definition: metafile.c:5489
static const unsigned char EMF_STRETCHDIBITS_1BIT_4X4_SIZED[]
Definition: metafile.c:5906
static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_4X4_NOSIZE[]
Definition: metafile.c:7338
static void test_mf_Graphics(void)
Definition: metafile.c:4044
static int CALLBACK savedc_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, const ENHMETARECORD *emr, int n_objs, LPARAM param)
Definition: metafile.c:475
static void test_emf_GradientFill(void)
Definition: metafile.c:9672
static const unsigned char emf_blit_bits[]
Definition: metafile.c:1790
static const unsigned char EMF_TEXTOUT_ON_PATH_BITS[]
Definition: metafile.c:1108
static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_3X3_NOSIZE[]
Definition: metafile.c:6792
static HENHMETAFILE create_converted_emf(const METAFILEPICT *mfp)
Definition: metafile.c:8718
static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, const ENHMETARECORD *emr, int n_objs, LPARAM param)
Definition: metafile.c:63
static void test_SetMetaFileBits(void)
Definition: metafile.c:3954
static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_3X3_SIZED[]
Definition: metafile.c:6755
static void test_emf_pattern_brush(void)
Definition: metafile.c:4246
static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_4X4_SIZED[]
Definition: metafile.c:7301
static const unsigned char EMF_BITBLT_32BIT_888_4X4[]
Definition: metafile.c:3233
static const unsigned char EMF_ALPHABLEND_1BIT[]
Definition: metafile.c:9982
static void test_gdiis(void)
Definition: metafile.c:9258
static const unsigned char EMF_STRETCHDIBITS_32BIT_888_4X4_NOSIZE[]
Definition: metafile.c:6256
static const unsigned char EMF_STRETCHDIBITS_32BIT_3X3_NOSIZE[]
Definition: metafile.c:5778
static const unsigned char EMF_ALPHABLEND_32BIT_888[]
Definition: metafile.c:10449
static void dump_emf_records(const HENHMETAFILE mf, const char *desc)
Definition: metafile.c:2176
static void test_mf_attrs(void)
Definition: metafile.c:3725
static const unsigned char EMF_BITBLT_16BIT_4X4[]
Definition: metafile.c:3280
static void test_ExtTextOutScale(void)
Definition: metafile.c:336
static const unsigned char EMF_STRETCHDIBITS_32BIT_888_4X4_SIZED[]
Definition: metafile.c:6299
static int compare_emf_bits(const HENHMETAFILE mf, const unsigned char *bits, UINT bsize, const char *desc, BOOL ignore_scaling)
Definition: metafile.c:2337
static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_4X4_SIZED[]
Definition: metafile.c:7605
static void test_mf_Blank(void)
Definition: metafile.c:3556
static COLORREF
Definition: metafile.c:40
static void test_mf_DCBrush(void)
Definition: metafile.c:4367
static const unsigned char EMF_STRETCHDIBITS_16BIT_4X4_NOSIZE[]
Definition: metafile.c:6342
static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_3X3_SIZED[]
Definition: metafile.c:6981
static void test_mf_GetPath(void)
Definition: metafile.c:8636
static void test_SetEnhMetaFileBits(void)
Definition: metafile.c:9304
static const unsigned char EMF_STRETCHBLT_24BIT_3X3[]
Definition: metafile.c:2704
static void test_SetWinMetaFileBits(void)
Definition: metafile.c:8893
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_3X3_SIZED[]
Definition: metafile.c:7222
#define LINE_Y
Definition: metafile.c:36
static const unsigned char EMF_STRETCHDIBITS_16BIT_3X3_NOSIZE[]
Definition: metafile.c:5696
static void translate(POINT *pt, UINT count, const XFORM *xform)
Definition: metafile.c:8268
static void test_mf_palette(void)
Definition: metafile.c:4764
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_3X3_NOSIZE[]
Definition: metafile.c:7102
static const unsigned char EMF_BEZIER_BITS[]
Definition: metafile.c:1350
static void test_metafile_file(void)
Definition: metafile.c:3591
static void test_mf_SetPixel(void)
Definition: metafile.c:3689
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_4X4_SIZED[]
Definition: metafile.c:7772
static const unsigned char EMF_STRETCHBLT_1BIT_3X3[]
Definition: metafile.c:2400
static void test_CopyMetaFile(void)
Definition: metafile.c:3906
static void test_emf_WorldTransform(void)
Definition: metafile.c:9917
static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_4X4_SIZED[]
Definition: metafile.c:7375
static const unsigned char EMF_BITBLT_24BIT_4X4[]
Definition: metafile.c:3189
static void test_emf_paths(void)
Definition: metafile.c:9518
static const unsigned char EMF_STRETCHDIBITS_32BIT_4X4_SIZED[]
Definition: metafile.c:6469
static int compare_mf_disk_bits(LPCSTR name, const BYTE *bits, UINT bsize, const char *desc)
Definition: metafile.c:2113
static INT
Definition: metafile.c:39
static void init_function_pointers(void)
Definition: metafile.c:48
static void test_emf_polybezier(void)
Definition: metafile.c:9350
static void test_ExtTextOut(void)
Definition: metafile.c:174
static void test_mf_conversions(void)
Definition: metafile.c:8750
static const unsigned char EMF_STRETCHDIBITS_8BIT_3X3_NOSIZE[]
Definition: metafile.c:5374
static void test_emf_blit(void)
Definition: metafile.c:5032
static void test_emf_DCBrush(void)
Definition: metafile.c:3502
static const unsigned char EMF_STRETCHDIBITS_24BIT_4X4_SIZED[]
Definition: metafile.c:6215
static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_4X4_NOSIZE[]
Definition: metafile.c:7564
static void dump_emf_bits(const HENHMETAFILE mf, const char *desc)
Definition: metafile.c:2152
static void test_mf_SetLayout(void)
Definition: metafile.c:10778
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_888_3X3_NOSIZE[]
Definition: metafile.c:7020
static const unsigned char EMF_STRETCHDIBITS_32BIT_888_3X3_NOSIZE[]
Definition: metafile.c:5610
static const unsigned char EMF_STRETCHDIBITS_24BIT_4X4_NOSIZE[]
Definition: metafile.c:6174
static void test_emf_select(void)
Definition: metafile.c:4563
static void dump_emf_record(const ENHMETARECORD *emr, const char *desc)
Definition: metafile.c:2200
static const unsigned char EMF_ALPHABLEND_32BIT[]
Definition: metafile.c:10510
static void dump_EMREXTTEXTOUT(const EMREXTTEXTOUTW *eto)
Definition: metafile.c:2222
static void test_PlayMetaFile(void)
Definition: metafile.c:5113
static const unsigned char EMF_POLYPOLYLINE_BITS[]
Definition: metafile.c:1395
static int CALLBACK clip_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, const ENHMETARECORD *emr, int n_objs, LPARAM param)
Definition: metafile.c:8289
static void getwinmetafilebits(UINT mode, int scale, RECT *rc)
Definition: metafile.c:9048
static const unsigned char EMF_LINETO_MM_ANISOTROPIC_BITS[]
Definition: metafile.c:1231
static const unsigned char EMF_BITBLT_4BIT_4X4[]
Definition: metafile.c:2930
static void checkConvertedFrameAndBounds(UINT buffer_size, BYTE *buffer, BOOL mfpIsNull, LONG mm, LONG xExt, LONG yExt, RECTL *rclBoundsExpected, RECTL *rclFrameExpected)
Definition: metafile.c:8854
static void test_mf_ExtTextOut_on_path(void)
Definition: metafile.c:8031
static const unsigned char emf_pattern_brush_bits[]
Definition: metafile.c:1486
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_555_3X3_SIZED[]
Definition: metafile.c:6904
static const unsigned char EMF_SETDIBITSTODEVICE_24BIT_3X3_NOSIZE[]
Definition: metafile.c:6942
static const unsigned char EMF_DCBRUSH_BITS[]
Definition: metafile.c:1305
static const unsigned char emf_mask_blit_bits[]
Definition: metafile.c:1926
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_888_3X3_SIZED[]
Definition: metafile.c:7061
static const unsigned char MF_DCBRUSH_BITS[]
Definition: metafile.c:1082
static void test_emf_palette(void)
Definition: metafile.c:4833
static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_3X3_SIZED[]
Definition: metafile.c:6681
static int clip_mf_enum_proc_seen_selectclipregion
Definition: metafile.c:8549
static void test_emf_attrs(void)
Definition: metafile.c:3882
static const unsigned char EMF_ALPHABLEND_8BIT[]
Definition: metafile.c:10097
static void test_emf_clipping(void)
Definition: metafile.c:8390
#define MF_BUFSIZE
Definition: metafile.c:1007
static const unsigned char MF_CLIP_BITS[]
Definition: metafile.c:8503
static const unsigned char MF_GRAPHICS_BITS[]
Definition: metafile.c:1027
static void test_emf_SetDIBitsToDevice(void)
Definition: metafile.c:7900
static const unsigned char EMF_STRETCHBLT_16BIT_555_3X3[]
Definition: metafile.c:2660
static const unsigned char EMF_STRETCHDIBITS_4BIT_3X3_SIZED[]
Definition: metafile.c:5336
static const unsigned char EMF_STRETCHDIBITS_8BIT_4X4_SIZED[]
Definition: metafile.c:6058
static const unsigned char EMF_BITBLT_1BIT_4X4[]
Definition: metafile.c:2889
static void test_emf_AlphaBlend(void)
Definition: metafile.c:10571
static void test_mf_select(void)
Definition: metafile.c:4414
static const unsigned char EMF_CLIPPING[]
Definition: metafile.c:8231
static void set_rotation_xform(XFORM *out, float rad, int dx, int dy)
Definition: metafile.c:9715
static const unsigned char EMF_STRETCHDIBITS_24BIT_3X3_SIZED[]
Definition: metafile.c:5569
static const unsigned char EMF_SETDIBITSTODEVICE_4BIT_3X3_NOSIZE[]
Definition: metafile.c:6718
static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, INT nObj, LPARAM lpData)
Definition: metafile.c:8678
static LOGFONTA orig_lf
Definition: metafile.c:31
static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_4X4_NOSIZE[]
Definition: metafile.c:7264
static const unsigned char EMF_GRADIENTFILL_BITS[]
Definition: metafile.c:1448
static const unsigned char EMF_STRETCHBLT_8BIT_3X3[]
Definition: metafile.c:2491
static const unsigned char EMF_STRETCHDIBITS_32BIT_3X3_SIZED[]
Definition: metafile.c:5823
static const unsigned char EMF_PATH_BITS[]
Definition: metafile.c:9389
static int clip_mf_enum_proc_seen_selectobject
Definition: metafile.c:8550
static void test_enhmetafile_file(void)
Definition: metafile.c:3749
static const unsigned char EMF_STRETCHDIBITS_16BIT_3X3_SIZED[]
Definition: metafile.c:5737
static const unsigned char EMF_STRETCHDIBITS_4BIT_4X4_SIZED[]
Definition: metafile.c:5982
static const unsigned char EMF_STRETCHDIBITS_16BIT_555_4X4_NOSIZE[]
Definition: metafile.c:6096
static const unsigned char EMF_STRETCHDIBITS_24BIT_3X3_NOSIZE[]
Definition: metafile.c:5528
static INT CALLBACK mf_enum_proc(HDC hdc, HANDLETABLE *ht, METARECORD *mr, INT nobj, LPARAM param)
Definition: metafile.c:2040
static void test_emf_BitBlt(void)
Definition: metafile.c:3371
static int CALLBACK clip_mf_enum_proc(HDC hdc, HANDLETABLE *handle_table, METARECORD *mr, int n_objs, LPARAM param)
Definition: metafile.c:8552
static const unsigned char SAMPLE_PATTERN_BRUSH[]
Definition: metafile.c:1010
static const unsigned char EMF_ALPHABLEND_24BIT[]
Definition: metafile.c:10392
static void test_mf_palette_brush(void)
Definition: metafile.c:4314
static const unsigned char EMF_STRETCHDIBITS_32BIT_888_3X3_SIZED[]
Definition: metafile.c:5653
static INT CALLBACK enum_emf_WorldTransform(HDC hdc, HANDLETABLE *ht, const ENHMETARECORD *emr, INT nobj, LPARAM param)
Definition: metafile.c:9747
static void check_dc_state(HDC hdc, int restore_no, int wnd_org_x, int wnd_org_y, int wnd_ext_x, int wnd_ext_y, int vp_org_x, int vp_org_y, int vp_ext_x, int vp_ext_y)
Definition: metafile.c:440
static const unsigned char MF_BLANK_BITS[]
Definition: metafile.c:1021
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_4X4_SIZED[]
Definition: metafile.c:7856
static const unsigned char MF_TEXTOUT_ON_PATH_BITS[]
Definition: metafile.c:1097
static const unsigned char EMF_BITBLT_8BIT_4X4[]
Definition: metafile.c:2978
static const unsigned char EMF_STRETCHDIBITS_1BIT_3X3_SIZED[]
Definition: metafile.c:5260
static void test_mf_FloodFill(void)
Definition: metafile.c:4099
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_3X3_SIZED[]
Definition: metafile.c:7141
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_3X3_NOSIZE[]
Definition: metafile.c:7180
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_555_4X4_NOSIZE[]
Definition: metafile.c:7486
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_4X4_NOSIZE[]
Definition: metafile.c:7732
static const unsigned char EMF_STRETCHDIBITS_8BIT_3X3_SIZED[]
Definition: metafile.c:5412
static int compare_mf_bits(const HMETAFILE mf, const unsigned char *bits, UINT bsize, const char *desc)
Definition: metafile.c:2083
static BOOL getConvertedFrameAndBounds(UINT buffer_size, BYTE *buffer, BOOL mfpIsNull, LONG mm, LONG xExt, LONG yExt, RECTL *rclBounds, RECTL *rclFrame)
Definition: metafile.c:8823
static const unsigned char EMF_STRETCHBLT_4BIT_3X3[]
Definition: metafile.c:2442
static const unsigned char EMF_STRETCHDIBITS_16BIT_555_3X3_NOSIZE[]
Definition: metafile.c:5450
static void test_GetWinMetaFileBits(void)
Definition: metafile.c:9226
static const unsigned char EMF_STRETCHDIBITS_8BIT_4X4_NOSIZE[]
Definition: metafile.c:6020
static BOOL emr_processed
Definition: metafile.c:32
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_555_4X4_SIZED[]
Definition: metafile.c:7525
static void test_emf_StretchDIBits(void)
Definition: metafile.c:6514
static const unsigned char EMF_STRETCHBLT_16BIT_3X3[]
Definition: metafile.c:2797
static void test_mf_PatternBrush(void)
Definition: metafile.c:4144
static void test_mf_SaveDC(void)
Definition: metafile.c:855
static const unsigned char EMF_STRETCHBLT_32BIT_3X3[]
Definition: metafile.c:2841
static void test_mf_clipping(void)
Definition: metafile.c:8566
static void test_SaveDC(void)
Definition: metafile.c:646
static const unsigned char EMF_TEXTOUT_OUTLINE_ON_PATH_BITS[]
Definition: metafile.c:1143
static void test_emf_PolyPolyline(void)
Definition: metafile.c:9618
static const unsigned char EMF_STRETCHDIBITS_16BIT_4X4_SIZED[]
Definition: metafile.c:6383
static BOOL xform_eq(const XFORM *a, const XFORM *b)
Definition: metafile.c:9737
static const unsigned char MF_SETLAYOUT_BITS[]
Definition: metafile.c:10743
static const unsigned char mf_palette_brush_bits[]
Definition: metafile.c:1549
static const unsigned char EMF_STRETCHDIBITS_1BIT_4X4_NOSIZE[]
Definition: metafile.c:5868
static const unsigned char EMF_STRETCHDIBITS_4BIT_3X3_NOSIZE[]
Definition: metafile.c:5298
#define GDI_GET_PROC(func)
Definition: metafile.c:43
static const unsigned char EMF_ALPHABLEND_16BIT[]
Definition: metafile.c:10278
static void test_emf_mask_blit(void)
Definition: metafile.c:5156
static BOOL match_emf_record(const ENHMETARECORD *emr1, const ENHMETARECORD *emr2, const char *desc, BOOL ignore_scaling)
Definition: metafile.c:2238
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_888_4X4_NOSIZE[]
Definition: metafile.c:7646
static const unsigned char EMF_STRETCHDIBITS_1BIT_3X3_NOSIZE[]
Definition: metafile.c:5222
static int CALLBACK pattern_brush_emf_enum_proc(HDC hdc, HANDLETABLE *htable, const ENHMETARECORD *rec, int n, LPARAM arg)
Definition: metafile.c:4214
static const unsigned char EMF_ALPHABLEND_4BIT[]
Definition: metafile.c:10036
static const unsigned char EMF_SETDIBITSTODEVICE_32BIT_888_4X4_SIZED[]
Definition: metafile.c:7689
static const unsigned char EMF_ALPHABLEND_16BIT_555[]
Definition: metafile.c:10335
static const PALETTEENTRY logpalettedata[8]
Definition: metafile.c:4753
static const unsigned char EMF_BITBLT_32BIT_4X4[]
Definition: metafile.c:3323
static const unsigned char EMF_SETDIBITSTODEVICE_1BIT_3X3_NOSIZE[]
Definition: metafile.c:6644
static void test_emf_ExtTextOut_on_path(void)
Definition: metafile.c:8084
#define LINE_X
Definition: metafile.c:35
static const unsigned char EMF_BITBLT_16BIT_555_4X4[]
Definition: metafile.c:3146
static const unsigned char EMF_SETDIBITSTODEVICE_8BIT_3X3_SIZED[]
Definition: metafile.c:6829
static const unsigned char EMF_LINETO_MM_TEXT_BITS[]
Definition: metafile.c:1273
static const unsigned char EMF_LINETO_BITS[]
Definition: metafile.c:1189
static const unsigned char EMF_STRETCHBLT_32BIT_888_3X3[]
Definition: metafile.c:2749
static const unsigned char MF_PATTERN_BRUSH_BITS[]
Definition: metafile.c:1039
static const unsigned char EMF_STRETCHDIBITS_32BIT_4X4_NOSIZE[]
Definition: metafile.c:6424
static const unsigned char EMF_STRETCHDIBITS_4BIT_4X4_NOSIZE[]
Definition: metafile.c:5944
static int WINAPI check_mf_records(HDC hdc, HANDLETABLE *htable, METARECORD *rec, int n, LPARAM ctx)
Definition: metafile.c:5103
static const unsigned char EMF_SETDIBITSTODEVICE_16BIT_555_3X3_NOSIZE[]
Definition: metafile.c:6866
static BOOL is_equal_rect(const RECT *rc1, const RECT *rc2)
Definition: metafile.c:8281
static int CALLBACK eto_scale_enum_proc(HDC hdc, HANDLETABLE *handle_table, const ENHMETARECORD *emr, int n_objs, LPARAM param)
Definition: metafile.c:318
static void test_emf_SetPixel(void)
Definition: metafile.c:3849
static const unsigned char EMF_EMPTY_PATH_BITS[]
Definition: metafile.c:9489
static const unsigned char metafile[]
Definition: olepicture.c:138
static HPALETTE palette
Definition: clipboard.c:1457
static const LOGPALETTE logpalette
Definition: clipboard.c:1458
#define min(a, b)
Definition: monoChain.cc:55
char temp_path[MAX_PATH]
Definition: mspatcha.c:123
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
Definition: mk_font.cpp:20
unsigned int UINT
Definition: ndis.h:50
#define RELATIVE(wait)
Definition: nfs41_driver.c:113
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
#define GENERIC_WRITE
Definition: nt_native.h:90
#define OBJ_METAFILE
Definition: objidl.idl:1022
#define OBJ_PEN
Definition: objidl.idl:1014
#define OBJ_METADC
Definition: objidl.idl:1017
#define OBJ_FONT
Definition: objidl.idl:1019
#define WS_POPUP
Definition: pedump.c:616
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define calloc
Definition: rosglue.h:14
#define test
Definition: rosglue.h:37
#define memset(x, y, z)
Definition: compat.h:39
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95
BYTE lfClipPrecision
Definition: dimm.idl:52
BYTE lfQuality
Definition: dimm.idl:53
LONG lfHeight
Definition: dimm.idl:42
BYTE lfCharSet
Definition: dimm.idl:50
LONG lfWeight
Definition: dimm.idl:46
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
LONG y
Definition: windef.h:130
LONG x
Definition: windef.h:129
RGNDATAHEADER rdh
Definition: axextend.idl:399
char Buffer[1]
Definition: axextend.idl:400
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
FLOAT eDy
Definition: wingdi.h:2172
FLOAT eM11
Definition: wingdi.h:2167
FLOAT eM21
Definition: wingdi.h:2169
FLOAT eM22
Definition: wingdi.h:2170
FLOAT eM12
Definition: wingdi.h:2168
FLOAT eDx
Definition: wingdi.h:2171
Definition: cookie.c:202
Definition: uimain.c:89
const WORD * records
Definition: metafile.c:5100
Definition: emfdc.c:45
Definition: fci.c:127
Definition: parser.c:49
Definition: metadc.c:46
Definition: name.c:39
USHORT biBitCount
Definition: precomp.h:34
ULONG biCompression
Definition: precomp.h:35
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1922
RGBQUAD bmiColors[1]
Definition: wingdi.h:1923
DWORD iGraphicsMode
Definition: wingdi.h:2428
EMRTEXT emrtext
Definition: wingdi.h:2431
POINTL aptlDest[3]
Definition: wingdi.h:2519
POINTS apts[1]
Definition: wingdi.h:2563
DWORD cptl
Definition: wingdi.h:2556
POINTL aptl[1]
Definition: wingdi.h:2557
LONG iRelative
Definition: wingdi.h:2597
DWORD fOptions
Definition: wingdi.h:2421
DWORD offDx
Definition: wingdi.h:2423
DWORD nChars
Definition: wingdi.h:2419
RECTL rcl
Definition: wingdi.h:2422
POINTL ptlReference
Definition: wingdi.h:2418
DWORD offString
Definition: wingdi.h:2420
DWORD iType
Definition: wingdi.h:2136
DWORD nSize
Definition: wingdi.h:2137
DWORD nRecords
Definition: wingdi.h:2773
RECTL rclFrame
Definition: wingdi.h:2769
SIZEL szlDevice
Definition: wingdi.h:2779
DWORD dSignature
Definition: wingdi.h:2770
RECTL rclBounds
Definition: wingdi.h:2768
HGDIOBJ objectHandle[1]
Definition: wingdi.h:2801
UINT lbStyle
Definition: wingdi.h:2193
ULONG_PTR lbHatch
Definition: wingdi.h:2195
COLORREF lbColor
Definition: wingdi.h:2194
WORD palNumEntries
Definition: wingdi.h:2280
WORD palVersion
Definition: wingdi.h:2279
HMETAFILE hMF
Definition: wingdi.h:3054
WORD mtHeaderSize
Definition: wingdi.h:2757
DWORD mtSize
Definition: wingdi.h:2759
WORD mtVersion
Definition: wingdi.h:2758
WORD mtType
Definition: wingdi.h:2756
DWORD rdSize
Definition: wingdi.h:2791
WORD rdParm[1]
Definition: wingdi.h:2793
WORD rdFunction
Definition: wingdi.h:2792
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
Definition: cmds.c:130
#define max(a, b)
Definition: svc.c:63
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx
Definition: synth_sse3d.h:87
const char * LPCSTR
Definition: typedefs.h:52
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned char * LPBYTE
Definition: typedefs.h:53
float FLOAT
Definition: typedefs.h:69
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define BI_RGB
Definition: uefivid.c:46
BOOL WINAPI GdiTransparentBlt(HDC hdcDst, int xDst, int yDst, int wDst, int hDst, HDC hdcSrc, int xSrc, int ySrc, int wSrc, int hSrc, UINT crTransparent)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
_In_ size_t cnt
Definition: wcstombs.cpp:43
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:245
COLORREF WINAPI SetDCPenColor(_In_ HDC hdc, _In_ COLORREF crColor)
Definition: dc.c:941
DWORD WINAPI GetRelAbs(_In_ HDC hdc, _In_ DWORD dwIgnore)
Definition: dc.c:720
COLORREF WINAPI SetDCBrushColor(_In_ HDC hdc, _In_ COLORREF crColor)
Definition: dc.c:905
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
DWORD COLORREF
Definition: windef.h:100
#define WINAPI
Definition: msvc.h:6
#define ERROR_SHARING_VIOLATION
Definition: winerror.h:257
#define ERROR_INVALID_DATA
Definition: winerror.h:238
#define NOMIRRORBITMAP
Definition: wingdi.h:1377
#define COMPLEXREGION
Definition: wingdi.h:363
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
#define BLACKNESS
Definition: wingdi.h:323
int WINAPI SetMapMode(_In_ HDC, _In_ int)
#define GM_COMPATIBLE
Definition: wingdi.h:864
BOOL WINAPI ArcTo(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xRadial1, _In_ INT yRadial1, _In_ INT xRadial2, _In_ INT yRadial2)
Definition: arc.c:79
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
#define FLOODFILLBORDER
Definition: wingdi.h:644
int WINAPI GetBkMode(_In_ HDC)
#define EMR_SAVEDC
Definition: wingdi.h:107
INT WINAPI SetRelAbs(HDC, INT)
Definition: dc.c:733
#define EMR_SETWINDOWEXTEX
Definition: wingdi.h:83
UINT WINAPI GetEnhMetaFileBits(_In_ HENHMETAFILE hEMF, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPBYTE lpData)
#define EMR_SETVIEWPORTEXTEX
Definition: wingdi.h:85
#define DIB_RGB_COLORS
Definition: wingdi.h:367
BOOL WINAPI Chord(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xRadial1, _In_ INT yRadial1, _In_ INT xRadial2, _In_ INT yRadial2)
Definition: arc.c:119
int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
#define HORZRES
Definition: wingdi.h:716
#define MM_MIN
Definition: wingdi.h:876
int WINAPI GetPolyFillMode(_In_ HDC)
BOOL WINAPI PolyBezier(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:263
#define MM_HIENGLISH
Definition: wingdi.h:868
#define EMR_EXTTEXTOUTA
Definition: wingdi.h:156
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define MWT_LEFTMULTIPLY
Definition: wingdi.h:945
BOOL WINAPI FloodFill(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ int cpt)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
BOOL WINAPI Ellipse(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define EMR_POLYBEZIER16
Definition: wingdi.h:158
#define FW_DONTCARE
Definition: wingdi.h:368
UINT WINAPI RealizePalette(_In_ HDC)
Definition: palette.c:138
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
BOOL WINAPI PolylineTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:397
struct tagPALETTEENTRY PALETTEENTRY
#define MM_LOENGLISH
Definition: wingdi.h:871
#define EMR_SELECTOBJECT
Definition: wingdi.h:111
#define EMR_EXTSELECTCLIPRGN
Definition: wingdi.h:148
#define DT_RASDISPLAY
Definition: wingdi.h:708
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI SetGraphicsMode(_In_ HDC, _In_ int)
Definition: dc.c:1233
#define DEFAULT_PALETTE
Definition: wingdi.h:913
#define GM_ADVANCED
Definition: wingdi.h:865
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:999
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define META_ESCAPE
Definition: wingdi.h:248
UINT WINAPI GetTextAlign(_In_ HDC)
Definition: text.c:837
HDC WINAPI CreateMetaFileA(_In_opt_ LPCSTR)
COLORREF WINAPI GetTextColor(_In_ HDC)
Definition: text.c:860
struct tagLOGPALETTE * PLOGPALETTE
#define WHITENESS
Definition: wingdi.h:337
#define EMR_RESTOREDC
Definition: wingdi.h:108
#define MM_HIMETRIC
Definition: wingdi.h:869
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:532
#define META_SELECTCLIPREGION
Definition: wingdi.h:254
BOOL WINAPI PlayEnhMetaFileRecord(_In_ HDC hdc, _In_reads_(cht) LPHANDLETABLE pht, _In_ CONST ENHMETARECORD *pmr, _In_ UINT cht)
#define BS_PATTERN
Definition: wingdi.h:1090
#define DEFAULT_QUALITY
Definition: wingdi.h:436
#define META_SETMAPMODE
Definition: wingdi.h:212
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
Definition: coord.c:465
#define TA_UPDATECP
Definition: wingdi.h:936
BOOL WINAPI GetCurrentPositionEx(_In_ HDC, _Out_ LPPOINT)
Definition: coord.c:241
#define NULLREGION
Definition: wingdi.h:361
#define VERTSIZE
Definition: wingdi.h:715
BOOL WINAPI GetWindowOrgEx(_In_ HDC, _Out_ LPPOINT)
Definition: coord.c:439
UINT WINAPI SetTextAlign(_In_ HDC, _In_ UINT)
Definition: text.c:882
#define EMR_LINETO
Definition: wingdi.h:128
#define AC_SRC_OVER
Definition: wingdi.h:1369
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI ExcludeClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define EMR_EXTTEXTOUTW
Definition: wingdi.h:157
#define RDH_RECTANGLES
Definition: wingdi.h:669
#define EMR_PLGBLT
Definition: wingdi.h:152
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
BOOL WINAPI PolyBezierTo(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ DWORD cpt)
Definition: painting.c:281
BOOL WINAPI LPtoDP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)
#define FLOODFILLSURFACE
Definition: wingdi.h:645
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
struct tagLOGPALETTE LOGPALETTE
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428
#define POLYGONALCAPS
Definition: wingdi.h:779
int WINAPI SetArcDirection(_In_ HDC, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
struct tagMETAFILEPICT * LPMETAFILEPICT
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI MaskBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ HBITMAP, _In_ int, _In_ int, _In_ DWORD)
BOOL WINAPI SelectClipPath(_In_ HDC, _In_ int)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:655
#define BLACKONWHITE
Definition: wingdi.h:952
HDC WINAPI CreateEnhMetaFileW(_In_opt_ HDC, _In_opt_ LPCWSTR, _In_opt_ LPCRECT, _In_opt_ LPCWSTR)
UINT WINAPI GetWinMetaFileBits(_In_ HENHMETAFILE hemf, _In_ UINT cbData16, _Out_writes_bytes_opt_(cbData16) LPBYTE pData16, _In_ INT iMapMode, _In_ HDC hdcRef)
#define MM_ANISOTROPIC
Definition: wingdi.h:867
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
HMETAFILE WINAPI CloseMetaFile(_In_ HDC hdc)
#define PT_LINETO
Definition: wingdi.h:885
#define EMR_CREATEMONOBRUSH
Definition: wingdi.h:166
#define EMR_EOF
Definition: wingdi.h:88
#define DIB_PAL_COLORS
Definition: wingdi.h:366
#define HORZSIZE
Definition: wingdi.h:714
#define TRANSPARENT
Definition: wingdi.h:950
#define RGN_COPY
Definition: wingdi.h:357
BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
#define BS_DIBPATTERN
Definition: wingdi.h:1092
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define RGN_AND
Definition: wingdi.h:356
UINT WINAPI GetMetaFileBitsEx(_In_ HMETAFILE hMF, _In_ UINT cbBuffer, _Out_writes_bytes_opt_(cbBuffer) LPVOID lpData)
BOOL WINAPI EnumMetaFile(_In_ HDC, _In_ HMETAFILE, _In_ MFENUMPROC, _In_opt_ LPARAM)
HDC WINAPI CreateMetaFileW(_In_opt_ LPCWSTR)
#define CLR_INVALID
Definition: wingdi.h:883
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
#define SRCCOPY
Definition: wingdi.h:333
#define VERTRES
Definition: wingdi.h:717
#define LAYOUT_RTL
Definition: wingdi.h:1371
#define WHITE_BRUSH
Definition: wingdi.h:902
COLORREF WINAPI GetBkColor(_In_ HDC)
Definition: dc.c:978
#define MM_TWIPS
Definition: wingdi.h:874
BOOL WINAPI ExtTextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define META_SETWINDOWORG
Definition: wingdi.h:221
HDC WINAPI CreateEnhMetaFileA(_In_opt_ HDC, _In_opt_ LPCSTR, _In_opt_ LPCRECT, _In_opt_ LPCSTR)
int WINAPI GetROP2(_In_ HDC)
Definition: dc.c:1093
#define TA_RTLREADING
Definition: wingdi.h:934
#define META_SETWINDOWEXT
Definition: wingdi.h:222
BOOL WINAPI GetWorldTransform(_In_ HDC, _Out_ LPXFORM)
Definition: coord.c:278
#define MM_LOMETRIC
Definition: wingdi.h:872
#define PATCOPY
Definition: wingdi.h:335
#define META_SELECTOBJECT
Definition: wingdi.h:255
#define EMR_SETWINDOWORGEX
Definition: wingdi.h:84
#define SIMPLEREGION
Definition: wingdi.h:362
#define META_LINETO
Definition: wingdi.h:229
#define ENHMETA_SIGNATURE
Definition: wingdi.h:204
int WINAPI GetStretchBltMode(_In_ HDC)
#define CURVECAPS
Definition: wingdi.h:759
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define ETO_OPAQUE
Definition: wingdi.h:647
#define BLACK_PEN
Definition: wingdi.h:903
#define OPAQUE
Definition: wingdi.h:949
#define MWT_RIGHTMULTIPLY
Definition: wingdi.h:946
#define MM_ISOTROPIC
Definition: wingdi.h:870
BOOL WINAPI EnumEnhMetaFile(_In_opt_ HDC, _In_ HENHMETAFILE, _In_ ENHMFENUMPROC, _In_opt_ PVOID, _In_opt_ LPCRECT)
#define ANSI_CHARSET
Definition: wingdi.h:383
#define GDI_ERROR
Definition: wingdi.h:1309
#define PT_CLOSEFIGURE
Definition: wingdi.h:887
BOOL WINAPI GetWindowExtEx(_In_ HDC, _Out_ LPSIZE)
Definition: coord.c:411
#define AD_COUNTERCLOCKWISE
Definition: wingdi.h:667
#define MM_TEXT
Definition: wingdi.h:873
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define PT_MOVETO
Definition: wingdi.h:884
BOOL WINAPI StrokeAndFillPath(_In_ HDC)
#define BLACK_BRUSH
Definition: wingdi.h:896
#define MWT_IDENTITY
Definition: wingdi.h:944
#define ETO_PDY
Definition: wingdi.h:657
#define EMR_POLYBEZIERTO16
Definition: wingdi.h:161
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
#define R2_NOT
Definition: wingdi.h:347
#define TA_TOP
Definition: wingdi.h:930
#define TA_BOTTOM
Definition: wingdi.h:929
#define FW_NORMAL
Definition: wingdi.h:373
#define PT_BEZIERTO
Definition: wingdi.h:886
HENHMETAFILE WINAPI SetEnhMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *pb)
#define TA_BASELINE
Definition: wingdi.h:928
#define HALFTONE
Definition: wingdi.h:955
BOOL WINAPI PlgBlt(_In_ HDC hdcDest, _In_reads_(3) const POINT *lpPoint, _In_ HDC hdcSrc, _In_ int xSrc, _In_ int ySrc, _In_ int width, _In_ int height, _In_opt_ HBITMAP hbmMask, _In_ int xMask, _In_ int yMask)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
DWORD WINAPI GetRegionData(_In_ HRGN hrgn, _In_ DWORD nCount, _Out_writes_bytes_to_opt_(nCount, return) LPRGNDATA lpRgnData)
HMETAFILE WINAPI CopyMetaFileA(_In_ HMETAFILE hmfSrc, _In_opt_ LPCSTR pszFile)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define EMR_CREATEDIBPATTERNBRUSHPT
Definition: wingdi.h:167
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056
int WINAPI OffsetClipRgn(_In_ HDC, _In_ int, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:917
#define LINECAPS
Definition: wingdi.h:770
#define PC_NOCOLLAPSE
Definition: wingdi.h:881
#define EMR_SETVIEWPORTORGEX
Definition: wingdi.h:86
BOOL WINAPI SetWorldTransform(_In_ HDC, _In_ const XFORM *)
int WINAPI SetROP2(_In_ HDC, _In_ int)
Definition: dc.c:1114
UINT WINAPI GetEnhMetaFileHeader(_In_ HENHMETAFILE hemf, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPENHMETAHEADER lpEnhMetaHeader)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
#define TA_CENTER
Definition: wingdi.h:931
BOOL WINAPI RoundRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI DeleteDC(_In_ HDC)
#define DT_METAFILE
Definition: wingdi.h:712
BOOL WINAPI CombineTransform(_Out_ LPXFORM pxformResult, _In_ const XFORM *pxform1, _In_ const XFORM *pxform2)
Definition: coord.c:64
BOOL WINAPI PolyDraw(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_reads_(cpt) const BYTE *aj, _In_ int cpt)
BOOL WINAPI GetViewportExtEx(_In_ HDC, _Out_ LPSIZE)
Definition: coord.c:351
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
#define AD_CLOCKWISE
Definition: wingdi.h:668
BOOL WINAPI EndPath(_In_ HDC)
#define EMR_POLYBEZIER
Definition: wingdi.h:76
#define EMR_HEADER
Definition: wingdi.h:75
#define EMR_POLYBEZIERTO
Definition: wingdi.h:79
#define EMR_MODIFYWORLDTRANSFORM
Definition: wingdi.h:110
BOOL WINAPI ExtFloodFill(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF, _In_ UINT)
BOOL WINAPI AngleArc(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ DWORD dwRadius, _In_ FLOAT eStartAngle, _In_ FLOAT eSweepAngle)
Definition: arc.c:49
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
BOOL WINAPI GetViewportOrgEx(_In_ HDC, _Out_ LPPOINT)
Definition: coord.c:383
BOOL WINAPI BeginPath(_In_ HDC hdc)
int WINAPI SetStretchBltMode(_In_ HDC, _In_ int)
Definition: dc.c:1373
#define R2_COPYPEN
Definition: wingdi.h:339
BOOL WINAPI PlayMetaFile(_In_ HDC, _In_ HMETAFILE)
BOOL WINAPI GetCharWidthA(_In_ HDC hdc, _In_ UINT iFirst, _In_ UINT iLast, _Out_writes_(iLast+1 - iFirst) LPINT lpBuffer)
#define PS_SOLID
Definition: wingdi.h:586
#define EMR_SETWORLDTRANSFORM
Definition: wingdi.h:109
BOOL WINAPI PolyPolyline(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const DWORD *asz, _In_ DWORD csz)
#define EMR_GDICOMMENT
Definition: wingdi.h:143
int WINAPI SaveDC(_In_ HDC)
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)
#define LAYOUT_BITMAPORIENTATIONPRESERVED
Definition: wingdi.h:1375
BOOL WINAPI ModifyWorldTransform(_In_ HDC, _In_opt_ const XFORM *, _In_ DWORD)
BOOL WINAPI GetTextExtentPoint32W(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE psizl)
#define TECHNOLOGY
Definition: wingdi.h:706
#define MFCOMMENT
Definition: wingdi.h:1008
int WINAPI GetArcDirection(_In_ HDC)
Definition: dc.c:358
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
BOOL WINAPI CloseFigure(_In_ HDC hdc)
HENHMETAFILE WINAPI SetWinMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *lpMeta16Data, _In_opt_ HDC hdcRef, _In_opt_ const METAFILEPICT *lpMFP)
int WINAPI GetPath(_In_ HDC hdc, _Out_writes_opt_(cpt) LPPOINT apt, _Out_writes_opt_(cpt) LPBYTE aj, int cpt)
BOOL WINAPI AbortPath(_In_ HDC hdc)
#define MM_MAX
Definition: wingdi.h:877
BOOL WINAPI Pie(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)
Definition: dc.c:1174
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define SM_CYSCREEN
Definition: winuser.h:971
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define SM_CXSCREEN
Definition: winuser.h:970
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
unsigned char BYTE
Definition: xxhash.c:193