From db158719d67fdef1d2c76300fb232cf2d4bfb35d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 24 Jan 2022 16:38:34 +0100 Subject: Simplify CLI --- tests/typeset.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/typeset.rs') 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()) } -- cgit v1.2.3