diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-11-23 23:46:43 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-11-23 23:46:43 +0100 |
commit | 7ba6206ec8bd904c53a662a2fce1e5f48961c431 (patch) | |
tree | b25c31eea6e76356aa1b02f54c6fdb5cd4d1d893 /src/render.rs | |
parent | d6ba356a7573202709c7b0ec2be3a2857b58bd6b (diff) | |
download | kondou-7ba6206ec8bd904c53a662a2fce1e5f48961c431.tar.gz kondou-7ba6206ec8bd904c53a662a2fce1e5f48961c431.tar.bz2 kondou-7ba6206ec8bd904c53a662a2fce1e5f48961c431.zip |
update dependencies
Diffstat (limited to 'src/render.rs')
-rw-r--r-- | src/render.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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<I>( 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(), ); } |