mirror of https://github.com/stelzo/typst.git
Fix curve with multiple non-closed components. (#5963)
This commit is contained in:
parent
d04f014fc6
commit
59569cbf61
|
|
@ -284,6 +284,7 @@ impl<'a> CurveBuilder<'a> {
|
|||
self.last_point = point;
|
||||
self.last_control_from = point;
|
||||
self.is_started = true;
|
||||
self.is_empty = true;
|
||||
}
|
||||
|
||||
/// Add a line segment.
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 85 B |
|
|
@ -38,6 +38,16 @@
|
|||
curve.close(mode: "smooth"),
|
||||
)
|
||||
|
||||
--- curve-multiple-non-closed ---
|
||||
#curve(
|
||||
stroke: 2pt,
|
||||
curve.line((20pt, 0pt)),
|
||||
curve.move((0pt, 10pt)),
|
||||
curve.line((20pt, 10pt)),
|
||||
curve.move((0pt, 20pt)),
|
||||
curve.line((20pt, 20pt)),
|
||||
)
|
||||
|
||||
--- curve-line ---
|
||||
#curve(
|
||||
fill: purple,
|
||||
|
|
|
|||
Loading…
Reference in New Issue