From: Esme Povirk esme@codeweavers.com
--- dlls/gdiplus/tests/graphicspath.c | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index f6e0264b786..b5c42d8378d 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1767,6 +1767,33 @@ static path_test_t widenline_capsquareanchor_multifigure_path[] = { {57.071068, 17.071068, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0}, /*23*/ };
+static path_test_t widenline_customarrow_multifigure_path[] = { + {6.0, 9.5, PathPointTypeStart}, /*0*/ + {24.0, 9.5, PathPointTypeLine}, /*1*/ + {24.0, 10.5, PathPointTypeLine}, /*2*/ + {6.0, 10.5, PathPointTypeLine|PathPointTypeCloseSubpath}, /*3*/ + {30.5, 11.0, PathPointTypeStart}, /*4*/ + {30.5, 29.0, PathPointTypeLine}, /*5*/ + {29.5, 29.0, PathPointTypeLine}, /*6*/ + {29.5, 11.0, PathPointTypeLine|PathPointTypeCloseSubpath}, /*7*/ + {13.0, 14.0, PathPointTypeStart}, /*8*/ + {5.0, 10.0, PathPointTypeLine}, /*9*/ + {13.0, 6.0, PathPointTypeLine}, /*10*/ + {11.0, 10.0, PathPointTypeLine|PathPointTypeCloseSubpath}, /*11*/ + {17.0, 6.0, PathPointTypeStart}, /*12*/ + {25.0, 10.0, PathPointTypeLine}, /*13*/ + {17.0, 14.0, PathPointTypeLine}, /*14*/ + {19.0, 10.0, PathPointTypeLine|PathPointTypeCloseSubpath}, /*15*/ + {26.0, 18.0, PathPointTypeStart}, /*16*/ + {30.0, 10.0, PathPointTypeLine}, /*17*/ + {34.0, 18.0, PathPointTypeLine}, /*18*/ + {30.0, 16.0, PathPointTypeLine|PathPointTypeCloseSubpath}, /*19*/ + {34.0, 22.0, PathPointTypeStart}, /*20*/ + {30.0, 30.0, PathPointTypeLine}, /*21*/ + {26.0, 22.0, PathPointTypeLine}, /*22*/ + {30.0, 24.0, PathPointTypeLine|PathPointTypeCloseSubpath}, /*23*/ + }; + static void test_widen_cap(void) { struct @@ -1873,14 +1900,28 @@ static void test_widen_cap(void) ok_path_fudge(path, widenline_capsquareanchor_multifigure_path, ARRAY_SIZE(widenline_capsquareanchor_multifigure_path), FALSE, 0.000005);
+ status = GdipResetPath(path); + expect(Ok, status); + status = GdipAddPathLine(path, 5.0, 10.0, 25.0, 10.0); + expect(Ok, status); + status = GdipStartPathFigure(path); + expect(Ok, status); + status = GdipAddPathLine(path, 30.0, 10.0, 30.0, 30.0); + expect(Ok, status); status = GdipCreateAdjustableArrowCap(4.0, 4.0, TRUE, &arrowcap); ok(status == Ok, "Failed to create adjustable cap, %d\n", status); status = GdipSetAdjustableArrowCapMiddleInset(arrowcap, 1.0); ok(status == Ok, "Failed to set middle inset inadjustable cap, %d\n", status); + status = GdipSetPenCustomStartCap(pen, (GpCustomLineCap*)arrowcap); + ok(status == Ok, "Failed to create custom end cap, %d\n", status); status = GdipSetPenCustomEndCap(pen, (GpCustomLineCap*)arrowcap); ok(status == Ok, "Failed to create custom end cap, %d\n", status); + status = GdipSetPenWidth(pen, 1.0); + expect(Ok, status); status = GdipWidenPath(path, pen, NULL, FlatnessDefault); expect(Ok, status); + ok_path_fudge(path, widenline_customarrow_multifigure_path, + ARRAY_SIZE(widenline_customarrow_multifigure_path), FALSE, 0.000005);
GdipDeletePen(pen);