Commit 32ac2d19 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Test for default Graphics clipping region.

parent c61ece67
...@@ -764,6 +764,40 @@ static void test_transformpoints(void) ...@@ -764,6 +764,40 @@ static void test_transformpoints(void)
ReleaseDC(0, hdc); ReleaseDC(0, hdc);
} }
static void test_getclip(void)
{
GpStatus status;
GpGraphics *graphics = NULL;
HDC hdc = GetDC(0);
GpRegion *clip;
BOOL res;
status = GdipCreateFromHDC(hdc, &graphics);
expect(Ok, status);
status = GdipCreateRegion(&clip);
/* NULL arguments */
status = GdipGetClip(NULL, NULL);
expect(InvalidParameter, status);
status = GdipGetClip(graphics, NULL);
expect(InvalidParameter, status);
status = GdipGetClip(NULL, clip);
expect(InvalidParameter, status);
res = FALSE;
status = GdipGetClip(graphics, clip);
todo_wine expect(Ok, status);
status = GdipIsInfiniteRegion(clip, graphics, &res);
todo_wine expect(Ok, status);
todo_wine expect(TRUE, res);
GdipDeleteRegion(clip);
GdipDeleteGraphics(graphics);
ReleaseDC(0, hdc);
}
START_TEST(graphics) START_TEST(graphics)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
...@@ -785,6 +819,7 @@ START_TEST(graphics) ...@@ -785,6 +819,7 @@ START_TEST(graphics)
test_GdipDrawLinesI(); test_GdipDrawLinesI();
test_Get_Release_DC(); test_Get_Release_DC();
test_transformpoints(); test_transformpoints();
test_getclip();
GdiplusShutdown(gdiplusToken); GdiplusShutdown(gdiplusToken);
} }
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