Vincent Povirk : gdiplus: Test that GdipGetRegionHRgn includes gdi32 transform.
Alexandre Julliard
julliard at winehq.org
Wed Aug 30 16:03:46 CDT 2017
Module: wine
Branch: master
Commit: 0241da1c2d893013eff26f6221a499bf58867d32
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0241da1c2d893013eff26f6221a499bf58867d32
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Aug 30 12:32:15 2017 -0500
gdiplus: Test that GdipGetRegionHRgn includes gdi32 transform.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/tests/region.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
index 06c47d9..86a2e40 100644
--- a/dlls/gdiplus/tests/region.c
+++ b/dlls/gdiplus/tests/region.c
@@ -1118,6 +1118,8 @@ static void test_gethrgn(void)
GpGraphics *graphics;
HRGN hrgn;
HDC hdc=GetDC(0);
+ INT rgntype;
+ RECT rgnbox;
static const RECT empty_rect = {0,0,0,0};
static const RECT test_rect = {10, 11, 20, 21};
static const GpRectF test_rectF = {10.0, 11.0, 10.0, 10.0};
@@ -1238,6 +1240,35 @@ static void test_gethrgn(void)
ok(status == Ok, "status %08x\n", status);
status = GdipDeleteGraphics(graphics);
ok(status == Ok, "status %08x\n", status);
+
+ /* test with gdi32 transform */
+ SetViewportOrgEx(hdc, 10, 10, NULL);
+
+ status = GdipCreateFromHDC(hdc, &graphics);
+ expect(Ok, status);
+
+ status = GdipCreateRegionRect(&test_rectF, ®ion);
+ expect(Ok, status);
+
+ status = GdipGetRegionHRgn(region, graphics, &hrgn);
+ expect(Ok, status);
+
+ rgntype = GetRgnBox(hrgn, &rgnbox);
+ DeleteObject(hrgn);
+
+ expect(SIMPLEREGION, rgntype);
+ expect(20, rgnbox.left);
+ expect(21, rgnbox.top);
+ expect(30, rgnbox.right);
+ expect(31, rgnbox.bottom);
+
+ status = GdipDeleteRegion(region);
+ expect(Ok, status);
+ status = GdipDeleteGraphics(graphics);
+ expect(Ok, status);
+
+ SetViewportOrgEx(hdc, 0, 0, NULL);
+
ReleaseDC(0, hdc);
}
More information about the wine-cvs
mailing list