Module: wine Branch: master Commit: 2bbd179ea4a2d6bad054175710e9df03a11267ed URL: http://source.winehq.org/git/wine.git/?a=commit;h=2bbd179ea4a2d6bad054175710...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Nov 8 16:33:42 2013 +0900
gdiplus: Add test for data returned by GdipGetRegionData for a translated integer region.
---
dlls/gdiplus/tests/region.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)
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);