diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 0a22b0b..7fbd45f 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -26,9 +26,7 @@ pub struct DrawCommand { pub text: String, pub cell_width: u64, pub grid_position: (u64, u64), - pub style: Option>, - #[new(value = "1")] - pub scale: u16 + pub style: Option> } pub struct Editor { diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index db3fda0..6d5d414 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -44,24 +44,24 @@ impl Renderer { self.font_height = font_height; } - fn compute_text_region(&self, grid_pos: (u64, u64), cell_width: u64, size: u16) -> Rect { + fn compute_text_region(&self, grid_pos: (u64, u64), cell_width: u64) -> Rect { let (grid_x, grid_y) = grid_pos; let x = grid_x as f32 * self.font_width; let y = grid_y as f32 * self.font_height; - let width = cell_width as f32 * self.font_width * size as f32; - let height = self.font_height * size as f32; + let width = cell_width as f32 * self.font_width as f32; + let height = self.font_height as f32; Rect::new(x, y, x + width, y + height) } - fn draw_background(&mut self, canvas: &mut Canvas, grid_pos: (u64, u64), cell_width:u64, size: u16, style: &Option>, default_style: &Arc