Commit 2bbd179e authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Add test for data returned by GdipGetRegionData for a translated integer region.

parent 108a6336
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment