aboutsummaryrefslogtreecommitdiff
path: root/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs18
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(),
);
}