From 7ba6206ec8bd904c53a662a2fce1e5f48961c431 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 23 Nov 2022 23:46:43 +0100 Subject: update dependencies --- src/render.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/render.rs') diff --git a/src/render.rs b/src/render.rs index b971426..5c091d1 100644 --- a/src/render.rs +++ b/src/render.rs @@ -165,8 +165,8 @@ impl<'r> Renderer<'r> { imageops::overlay( buffer, &minor_img, - x - half(trait_size), - y - half(trait_size), + (x - half(trait_size)).into(), + (y - half(trait_size)).into(), ); Ok(()) } @@ -193,8 +193,8 @@ impl<'r> Renderer<'r> { imageops::overlay( buffer, &major_img, - x - half(trait_size), - y - half(trait_size), + (x - half(trait_size)).into(), + (y - half(trait_size)).into(), ); Ok(()) } @@ -269,7 +269,7 @@ impl<'r> Renderer<'r> { let minor_traits = self.api.get_traits(&spec.minor_traits)?; for minor in &minor_traits { - self.render_minor_trait(&mut buffer, &minor)?; + self.render_minor_trait(&mut buffer, minor)?; } let major_traits = self.api.get_traits(&spec.major_traits)?; @@ -277,7 +277,7 @@ impl<'r> Renderer<'r> { let choice = choices[major.tier as usize - 1]; let vert_pos = (i as u32 % TRAITS_PER_TIER) as u8; let chosen = choice as u8 == vert_pos + 1; - self.render_major_trait(&mut buffer, &major, vert_pos, chosen)?; + self.render_major_trait(&mut buffer, major, vert_pos, chosen)?; } for (tier, choice) in choices.iter().enumerate() { @@ -333,7 +333,7 @@ impl<'r> Renderer<'r> { let header = self.render_specialization_name(&traitline.0)?; images.push((self.options.specialization_name_alignment, header)); } - let inner = self.render_traitline(&traitline)?; + let inner = self.render_traitline(traitline)?; images.push((Alignment::Left, inner)); } @@ -478,8 +478,8 @@ fn draw_thick_line( imageops::overlay( image, &line_buffer, - half_x - half(line_length), - half_y - half(line_length), + (half_x - half(line_length)).into(), + (half_y - half(line_length)).into(), ); } -- cgit v1.2.3