diff --git a/library/src/visualize/path.rs b/library/src/visualize/path.rs index 436ef5f0..db062093 100644 --- a/library/src/visualize/path.rs +++ b/library/src/visualize/path.rs @@ -123,6 +123,7 @@ impl Layout for PathElem { let to_point = points[0]; add_cubic(from_point, to_point, from, to); + path.close_path(); } // Prepare fill and stroke. diff --git a/tests/ref/visualize/path.png b/tests/ref/visualize/path.png index ec537f0a..c7f710c9 100644 Binary files a/tests/ref/visualize/path.png and b/tests/ref/visualize/path.png differ diff --git a/tests/typ/visualize/path.typ b/tests/typ/visualize/path.typ index c7c1af50..d475811f 100644 --- a/tests/typ/visualize/path.typ +++ b/tests/typ/visualize/path.typ @@ -30,6 +30,13 @@ ((30%, 60%), (-20%, 0%), (0%, 0%)), ((50%, 30%), (60%, -30%), (60%, 0%)), ), + path( + stroke: 5pt, + closed: true, + (0pt, 30pt), + (30pt, 30pt), + (15pt, 0pt), + ), ) ---