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/math/matrix.rs | |
| parent | 6b1233e127d815b38fea9ab909dd4081cdf76ca2 (diff) | |
Gradient Part 2 - Linear gradients (#2279)
Diffstat (limited to 'crates/typst-library/src/math/matrix.rs')
| -rw-r--r-- | crates/typst-library/src/math/matrix.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index 68f7f438..1dee5434 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -396,7 +396,7 @@ fn layout_mat_body( let ncols = rows.first().map_or(0, |row| row.len()); let nrows = rows.len(); if ncols == 0 || nrows == 0 { - return Ok(Frame::new(Size::zero())); + return Ok(Frame::soft(Size::zero())); } // Before the full matrix body can be laid out, the @@ -431,7 +431,7 @@ fn layout_mat_body( heights.iter().map(|&(a, b)| a + b).sum::<Abs>() + gap.y * (nrows - 1) as f64; // Width starts at zero because it can't be calculated until later - let mut frame = Frame::new(Size::new(Abs::zero(), total_height)); + let mut frame = Frame::soft(Size::new(Abs::zero(), total_height)); let mut x = Abs::zero(); |
