diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-01-24 16:38:34 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-01-24 16:44:52 +0100 |
| commit | db158719d67fdef1d2c76300fb232cf2d4bfb35d (patch) | |
| tree | 3704d2c3b37521e1ecae75c3246fd5573537b378 /tests/typeset.rs | |
| parent | 36cae88799722fe873b578114d24201db8903d67 (diff) | |
Simplify CLI
Diffstat (limited to 'tests/typeset.rs')
| -rw-r--r-- | tests/typeset.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 60214b9f..a4e20774 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -760,7 +760,12 @@ fn draw_image( let w = (scale * view_width.max(aspect * view_height)).ceil() as u32; let h = ((w as f32) / aspect).ceil() as u32; let mut pixmap = sk::Pixmap::new(w, h).unwrap(); - resvg::render(&tree, FitTo::Size(w, h), pixmap.as_mut()); + resvg::render( + &tree, + FitTo::Size(w, h), + sk::Transform::identity(), + pixmap.as_mut(), + ); pixmap } }; @@ -838,7 +843,7 @@ fn convert_usvg_fill(fill: &usvg::Fill) -> (sk::Paint<'static>, sk::FillRule) { let mut paint = sk::Paint::default(); paint.anti_alias = true; - if let usvg::Paint::Color(usvg::Color { red, green, blue, alpha: _ }) = fill.paint { + if let usvg::Paint::Color(usvg::Color { red, green, blue }) = fill.paint { paint.set_color_rgba8(red, green, blue, fill.opacity.to_u8()) } |
