[6/6] gdiplus: Add test for data returned by GdipGetRegionData for a translated integer region.
Dmitry Timoshkov
dmitry at baikal.ru
Fri Nov 8 01:33:42 CST 2013
---
dlls/gdiplus/tests/region.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
index 3e6f902..f509204 100644
--- a/dlls/gdiplus/tests/region.c
+++ b/dlls/gdiplus/tests/region.c
@@ -2,6 +2,7 @@
* Unit test suite for gdiplus regions
*
* Copyright (C) 2008 Huw Davies
+ * Copyright (C) 2013 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -420,6 +421,45 @@ static void test_getregiondata(void)
expect(6, point[3].Y);
expect_dword(buf + 13, 0x81010100); /* 0x01010100 if we don't close the path */
+ status = GdipTranslateRegion(region, 0.6, 0.8);
+ expect(Ok, status);
+ memset(buf, 0, sizeof(buf));
+ needed = 0;
+ status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed);
+ expect(Ok, status);
+todo_wine
+ expect(72, needed);
+todo_wine
+ expect_dword(buf, 64);
+ expect_magic(buf + 2);
+ expect_dword(buf + 3 , 0);
+ expect_dword(buf + 4 , RGNDATA_PATH);
+todo_wine
+ expect_dword(buf + 5, 48);
+ expect_magic(buf + 6);
+ expect_dword(buf + 7, 4);
+ /* flags 0 means that a path is an array of FLOATs */
+todo_wine
+ expect_dword(buf + 8, 0);
+todo_wine
+ expect_float(buf + 9, 5.6);
+todo_wine
+ expect_float(buf + 10, 6.8);
+todo_wine
+ expect_float(buf + 11, 7.6);
+todo_wine
+ expect_float(buf + 12, 8.8);
+todo_wine
+ expect_float(buf + 13, 8.6);
+todo_wine
+ expect_float(buf + 14, 1.8);
+todo_wine
+ expect_float(buf + 15, 5.6);
+todo_wine
+ expect_float(buf + 16, 6.8);
+todo_wine
+ expect_dword(buf + 17, 0x81010100); /* 0x01010100 if we don't close the path */
+
status = GdipDeletePath(path);
expect(Ok, status);
status = GdipDeleteRegion(region);
--
1.8.4.1
More information about the wine-patches
mailing list