diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
| commit | c975d0d5e989cca6eff8e80ca8174f85eb4a3460 (patch) | |
| tree | 7aaf68ee71d81a1d71d7dcb1f928659bc6fa975d /tests/typeset.rs | |
| parent | 24c4a746bc68874f2d1b0d1b726596930acaadcf (diff) | |
Tidy up layouting code
Diffstat (limited to 'tests/typeset.rs')
| -rw-r--r-- | tests/typeset.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 4572e81b..f60b81f7 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -220,7 +220,7 @@ fn test_part( // large and fit them to match their content. let mut state = State::default(); state.page.size = Size::new(Length::pt(120.0), Length::raw(f64::INFINITY)); - state.page.margins = Sides::uniform(Some(Length::pt(10.0).into())); + state.page.margins = Sides::splat(Some(Length::pt(10.0).into())); let Pass { output: mut frames, diags } = typeset(env, &src, &scope, state); if !compare_ref { @@ -368,7 +368,7 @@ fn draw(env: &Env, frames: &[Frame], dpi: f32) -> Pixmap { let ts = Transform::from_scale(dpi, dpi); canvas.fill(Color::BLACK); - let mut origin = Point::new(pad, pad); + let mut origin = Point::splat(pad); for frame in frames { let mut paint = Paint::default(); paint.set_color(Color::WHITE); @@ -469,7 +469,7 @@ fn draw_geometry(canvas: &mut Pixmap, ts: Transform, shape: &Shape, fill: Fill) canvas.fill_rect(rect, &paint, ts, None); } Shape::Ellipse(size) => { - let path = convert_typst_path(&geom::ellipse_path(size)); + let path = convert_typst_path(&geom::Path::ellipse(size)); canvas.fill_path(&path, &paint, rule, ts, None); } Shape::Path(ref path) => { |
