diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-10-03 19:31:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 19:31:02 +0200 |
| commit | a4e357fb37d76d32d06ad8cc21e47bb2cc064cfd (patch) | |
| tree | 52e118513218d961cc5e8c713575049cd75a2e95 /crates/typst-library/src/visualize/path.rs | |
| parent | 6b1233e127d815b38fea9ab909dd4081cdf76ca2 (diff) | |
Gradient Part 2 - Linear gradients (#2279)
Diffstat (limited to 'crates/typst-library/src/visualize/path.rs')
| -rw-r--r-- | crates/typst-library/src/visualize/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-library/src/visualize/path.rs b/crates/typst-library/src/visualize/path.rs index c252e95f..79364b07 100644 --- a/crates/typst-library/src/visualize/path.rs +++ b/crates/typst-library/src/visualize/path.rs @@ -82,7 +82,7 @@ impl Layout for PathElem { let mut size = Size::zero(); if points.is_empty() { - return Ok(Fragment::frame(Frame::new(size))); + return Ok(Fragment::frame(Frame::soft(size))); } // Only create a path if there are more than zero points. @@ -138,7 +138,7 @@ impl Layout for PathElem { Smart::Custom(stroke) => stroke.map(Stroke::unwrap_or_default), }; - let mut frame = Frame::new(size); + let mut frame = Frame::soft(size); let shape = Shape { geometry: Geometry::Path(path), stroke, fill }; frame.push(Point::zero(), FrameItem::Shape(shape, self.span())); |
