Commit 134cb70f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus/tests: Test for initial properties of adjustable arrow caps.

parent dc6e2eaf
...@@ -217,6 +217,56 @@ static void test_scale(void) ...@@ -217,6 +217,56 @@ static void test_scale(void)
GdipDeletePath(path); GdipDeletePath(path);
} }
static void test_create_adjustable_cap(void)
{
GpAdjustableArrowCap *cap;
REAL inset, scale;
GpLineJoin join;
GpStatus stat;
GpLineCap base;
stat = GdipCreateAdjustableArrowCap(10.0, 10.0, TRUE, NULL);
todo_wine
ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat);
stat = GdipCreateAdjustableArrowCap(17.0, 15.0, TRUE, &cap);
todo_wine
ok(stat == Ok, "Failed to create adjustable cap, %d\n", stat);
if (stat != Ok)
return;
stat = GdipGetAdjustableArrowCapMiddleInset(cap, NULL);
ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat);
stat = GdipGetAdjustableArrowCapMiddleInset(cap, &inset);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
ok(inset == 0.0f, "Unexpected middle inset %f\n", inset);
stat = GdipGetCustomLineCapBaseCap((GpCustomLineCap*)cap, &base);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
ok(base == LineCapTriangle, "Unexpected base cap %d\n", base);
stat = GdipSetCustomLineCapBaseCap((GpCustomLineCap*)cap, LineCapSquare);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
stat = GdipGetCustomLineCapBaseCap((GpCustomLineCap*)cap, &base);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
ok(base == LineCapSquare, "Unexpected base cap %d\n", base);
stat = GdipGetCustomLineCapBaseInset((GpCustomLineCap*)cap, &inset);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
stat = GdipGetCustomLineCapWidthScale((GpCustomLineCap*)cap, &scale);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
ok(scale == 1.0f, "Unexpected width scale %f\n", scale);
stat = GdipGetCustomLineCapStrokeJoin((GpCustomLineCap*)cap, &join);
ok(stat == Ok, "Unexpected return code, %d\n", stat);
ok(join == LineJoinMiter, "Unexpected stroke join %d\n", join);
GdipDeleteCustomLineCap((GpCustomLineCap*)cap);
}
START_TEST(customlinecap) START_TEST(customlinecap)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
...@@ -233,6 +283,7 @@ START_TEST(customlinecap) ...@@ -233,6 +283,7 @@ START_TEST(customlinecap)
test_linejoin(); test_linejoin();
test_inset(); test_inset();
test_scale(); test_scale();
test_create_adjustable_cap();
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