gdiplus/tests: Add cursory GdipGetClipBoundsI checks to graphics clipping test.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Shawn M. Chapla 2020-08-25 18:13:40 -04:00 committed by Alexandre Julliard
parent c155b043fd
commit 5e40198862
1 changed files with 11 additions and 0 deletions

View File

@ -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);