aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-03-28 16:20:59 +0100
committerAkshay <[email protected]>2021-03-28 16:20:59 +0100
commit6f40ddc6eb92acd24101e7fe0ecc773ab7e6f4f9 (patch)
tree62a523364a9338a33320b2cf8a004c26bc5d3744 /src/app.rs
parent4b55f3e0b4577dc3aa0b40d1a014f1b619c10b3e (diff)
deprecate last_point
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs5
1 files changed, 1 insertions, 4 deletions
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> {
43 pub dither_level: u8, 43 pub dither_level: u8,
44 pub file_name: Option<&'file Path>, 44 pub file_name: Option<&'file Path>,
45 pub grid: Grid, 45 pub grid: Grid,
46 pub last_point: Option<MapPoint>,
47 pub lisp_env: EnvList, 46 pub lisp_env: EnvList,
48 pub message: Message, 47 pub message: Message,
49 pub mode: Mode, 48 pub mode: Mode,
@@ -415,7 +414,7 @@ impl<'ctx, 'file> AppState<'ctx, 'file> {
415 } 414 }
416 match self.brush { 415 match self.brush {
417 Brush::Line(LineBrush { start, size, .. }) => { 416 Brush::Line(LineBrush { start, size, .. }) => {
418 let size = self.zoom as u32 * size as u32; 417 let size = self.zoom as u32 * (size as u32 + 5);
419 if let (Some(from), Some(to)) = (start, pt) { 418 if let (Some(from), Some(to)) = (start, pt) {
420 let line = self.pixmap.get_line(from, to.into()); 419 let line = self.pixmap.get_line(from, to.into());
421 draw_text( 420 draw_text(
@@ -541,7 +540,6 @@ impl<'ctx, 'file> AppState<'ctx, 'file> {
541 dither_level: 16, 540 dither_level: 16,
542 file_name, 541 file_name,
543 grid: Grid::new(), 542 grid: Grid::new(),
544 last_point: None,
545 lisp_env: vec![prelude::new_env()], 543 lisp_env: vec![prelude::new_env()],
546 message: Message::new().text(" "), 544 message: Message::new().text(" "),
547 mode: Mode::Draw, 545 mode: Mode::Draw,
@@ -664,7 +662,6 @@ impl<'ctx, 'file> AppState<'ctx, 'file> {
664 } => { 662 } => {
665 let pt = (x, y); 663 let pt = (x, y);
666 let contact = self.idx_at_coord(pt).map(MapPoint::from); 664 let contact = self.idx_at_coord(pt).map(MapPoint::from);
667 self.last_point = self.idx_at_coord(pt).map(MapPoint::from);
668 let val = match mouse_btn { 665 let val = match mouse_btn {
669 MouseButton::Right => !self.active_color, 666 MouseButton::Right => !self.active_color,
670 _ => self.active_color, 667 _ => self.active_color,