Shawn M. Chapla : gdiplus/tests: Add cursory GdipGetClipBoundsI checks to graphics clipping test.
Alexandre Julliard
julliard at winehq.org
Wed Aug 26 15:24:45 CDT 2020
Module: wine
Branch: master
Commit: 5e40198862ea0ed8a389d7d3ed5fdec0e97689e5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5e40198862ea0ed8a389d7d3ed5fdec0e97689e5
Author: Shawn M. Chapla <schapla at codeweavers.com>
Date: Tue Aug 25 18:13:40 2020 -0400
gdiplus/tests: Add cursory GdipGetClipBoundsI checks to graphics clipping test.
Signed-off-by: Shawn M. Chapla <schapla at codeweavers.com>
Signed-off-by: Esme Povirk <esme at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/tests/graphics.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index d1f0d03ddc..38780d4686 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -5071,6 +5071,7 @@ static void test_clipping(void)
GpRegion *region, *region100x100;
GpMatrix *matrix;
GpRectF rect;
+ GpRect recti;
GpPointF ptf[4];
GpUnit unit;
HRGN hrgn;
@@ -5107,6 +5108,11 @@ static void test_clipping(void)
ok(rect.X == 100.0 && rect.Y == 100.0 && rect.Width == 100.0 && rect.Height == 100.0,
"expected 100.0,100.0-100.0,100.0, got %.2f,%.2f-%.2f,%.2f\n", rect.X, rect.Y, rect.Width, rect.Height);
+ status = GdipGetClipBoundsI(graphics, &recti);
+ expect(Ok, status);
+ ok(recti.X == 100 && recti.Y == 100 && recti.Width == 100 && recti.Height == 100,
+ "expected 100,100-100,100, got %i,%i-%i,%i\n", recti.X, recti.Y, recti.Width, recti.Height);
+
/* Clip region does not account for changes to gdi32 transform */
SetViewportOrgEx(hdc, 10, 10, NULL);
@@ -5149,6 +5155,11 @@ static void test_clipping(void)
ok(rect.X == 45.0 && rect.Y == 20.0 && rect.Width == 50.0 && rect.Height == 25.0,
"expected 45.0,20.0-50.0,25.0, got %.2f,%.2f-%.2f,%.2f\n", rect.X, rect.Y, rect.Width, rect.Height);
+ status = GdipGetClipBoundsI(graphics, &recti);
+ expect(Ok, status);
+ todo_wine ok(recti.X == 45 && recti.Y == 20 && recti.Width == 50 && recti.Height == 25,
+ "expected 45,20-50,25, got %i,%i-%i,%i\n", recti.X, recti.Y, recti.Width, recti.Height);
+
status = GdipSetEmpty(region);
expect(Ok, status);
status = GdipGetClip(graphics, region);
More information about the wine-cvs
mailing list