gdi32: CURVECAPS, LINECAPS and POLYGONALCAPS for an EMF are device dependent.

Dmitry Timoshkov dmitry at baikal.ru
Fri May 20 02:01:52 CDT 2011


just like other EMF device capabilities.
---
 dlls/gdi32/tests/metafile.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index 206e15a..a4dea22 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -2806,7 +2806,7 @@ static void getwinmetafilebits(UINT mode, int scale, RECT *rc)
     METAHEADER *mh = NULL;
     METARECORD *rec;
     INT horz_res, vert_res, horz_size, vert_size;
-    INT curve_caps, line_caps, poly_caps;
+    INT curve_caps, line_caps, poly_caps, emf_curve_caps, emf_line_caps, emf_poly_caps;
 
     display_dc = GetDC(NULL);
     ok(display_dc != NULL, "display_dc is NULL\n");
@@ -2815,18 +2815,21 @@ static void getwinmetafilebits(UINT mode, int scale, RECT *rc)
     vert_res = GetDeviceCaps(display_dc, VERTRES);
     horz_size = GetDeviceCaps(display_dc, HORZSIZE);
     vert_size = GetDeviceCaps(display_dc, VERTSIZE);
+    curve_caps = GetDeviceCaps(display_dc, CURVECAPS);
+    line_caps = GetDeviceCaps(display_dc, LINECAPS);
+    poly_caps = GetDeviceCaps(display_dc, POLYGONALCAPS);
 
     emf_dc = CreateEnhMetaFileA(display_dc, NULL, rc, NULL);
     ok(emf_dc != NULL, "emf_dc is NULL\n");
 
-    curve_caps = GetDeviceCaps(emf_dc, CURVECAPS);
-    ok(curve_caps == 511, "expect 511 got %d\n", curve_caps);
+    emf_curve_caps = GetDeviceCaps(emf_dc, CURVECAPS);
+    ok(emf_curve_caps == curve_caps, "expected %#x got %#x\n", curve_caps, emf_curve_caps);
 
-    line_caps = GetDeviceCaps(emf_dc, LINECAPS);
-    ok(line_caps == 254, "expect 254 got %d\n", line_caps);
+    emf_line_caps = GetDeviceCaps(emf_dc, LINECAPS);
+    ok(emf_line_caps == line_caps, "expected %#x got %#x\n", line_caps, emf_line_caps);
 
-    poly_caps = GetDeviceCaps(emf_dc, POLYGONALCAPS);
-    ok(poly_caps == 255, "expect 511 got %d\n", poly_caps);
+    emf_poly_caps = GetDeviceCaps(emf_dc, POLYGONALCAPS);
+    ok(emf_poly_caps == poly_caps, "expected %#x got %#x\n", poly_caps, emf_poly_caps);
 
     for(i = 0; i < 3000; i++) /* This is enough to take emf_size > 0xffff */
         Rectangle(emf_dc, 0, 0, 1000, 20);
-- 
1.7.5.1




More information about the wine-patches mailing list