From 6f40ddc6eb92acd24101e7fe0ecc773ab7e6f4f9 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 28 Mar 2021 20:50:59 +0530 Subject: deprecate last_point --- src/app.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index ea1e893..016349b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -43,7 +43,6 @@ pub struct AppState<'ctx, 'file> { pub dither_level: u8, pub file_name: Option<&'file Path>, pub grid: Grid, - pub last_point: Option, pub lisp_env: EnvList, pub message: Message, pub mode: Mode, @@ -415,7 +414,7 @@ impl<'ctx, 'file> AppState<'ctx, 'file> { } match self.brush { Brush::Line(LineBrush { start, size, .. }) => { - let size = self.zoom as u32 * size as u32; + let size = self.zoom as u32 * (size as u32 + 5); if let (Some(from), Some(to)) = (start, pt) { let line = self.pixmap.get_line(from, to.into()); draw_text( @@ -541,7 +540,6 @@ impl<'ctx, 'file> AppState<'ctx, 'file> { dither_level: 16, file_name, grid: Grid::new(), - last_point: None, lisp_env: vec![prelude::new_env()], message: Message::new().text(" "), mode: Mode::Draw, @@ -664,7 +662,6 @@ impl<'ctx, 'file> AppState<'ctx, 'file> { } => { let pt = (x, y); let contact = self.idx_at_coord(pt).map(MapPoint::from); - self.last_point = self.idx_at_coord(pt).map(MapPoint::from); let val = match mouse_btn { MouseButton::Right => !self.active_color, _ => self.active_color, -- cgit v1.2.3