summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/visualize/path.rs
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2023-10-03 19:31:02 +0200
committerGitHub <noreply@github.com>2023-10-03 19:31:02 +0200
commita4e357fb37d76d32d06ad8cc21e47bb2cc064cfd (patch)
tree52e118513218d961cc5e8c713575049cd75a2e95 /crates/typst-library/src/visualize/path.rs
parent6b1233e127d815b38fea9ab909dd4081cdf76ca2 (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.rs4
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()));