mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
path: Use close_path() for closing paths (#801)
This commit is contained in:
parent
66c707f216
commit
981c578ff9
@ -123,6 +123,7 @@ impl Layout for PathElem {
|
|||||||
let to_point = points[0];
|
let to_point = points[0];
|
||||||
|
|
||||||
add_cubic(from_point, to_point, from, to);
|
add_cubic(from_point, to_point, from, to);
|
||||||
|
path.close_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare fill and stroke.
|
// Prepare fill and stroke.
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
@ -30,6 +30,13 @@
|
|||||||
((30%, 60%), (-20%, 0%), (0%, 0%)),
|
((30%, 60%), (-20%, 0%), (0%, 0%)),
|
||||||
((50%, 30%), (60%, -30%), (60%, 0%)),
|
((50%, 30%), (60%, -30%), (60%, 0%)),
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
stroke: 5pt,
|
||||||
|
closed: true,
|
||||||
|
(0pt, 30pt),
|
||||||
|
(30pt, 30pt),
|
||||||
|
(15pt, 0pt),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user