summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/visualize/path.rs1
-rw-r--r--tests/ref/visualize/path.pngbin3405 -> 3575 bytes
-rw-r--r--tests/typ/visualize/path.typ7
3 files changed, 8 insertions, 0 deletions
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
--- a/tests/ref/visualize/path.png
+++ b/tests/ref/visualize/path.png
Binary files 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),
+ ),
)
---