path: Use close_path() for closing paths (#801)

This commit is contained in:
Johannes Wolf 2023-04-19 16:30:27 +02:00 committed by GitHub
parent 66c707f216
commit 981c578ff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -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),
),
)
---