aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app.rs b/src/app.rs
index 68d687f..3e7ac0f 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1,5 +1,5 @@
1use crate::{ 1use crate::{
2 bitmap::{abs_difference, positive_angle_with_x, Axis, MapPoint, Pixmap}, 2 bitmap::{abs_difference, manhattan, positive_angle_with_x, Axis, MapPoint, Pixmap},
3 brush::{Brush, CircleBrush, LineBrush, RectSelectBrush}, 3 brush::{Brush, CircleBrush, LineBrush, RectSelectBrush},
4 cache::Cache, 4 cache::Cache,
5 command::CommandBox, 5 command::CommandBox,
@@ -481,8 +481,9 @@ impl<'ctx> AppState<'ctx> {
481 &mut self.canvas, 481 &mut self.canvas,
482 self.ttf_context, 482 self.ttf_context,
483 format!( 483 format!(
484 "{:.width$}°", 484 "{:.width$}°, {}",
485 angle, 485 angle,
486 manhattan(from, to.into()),
486 width = if (angle - ANGLE).abs() < 1e-3 { 3 } else { 0 } 487 width = if (angle - ANGLE).abs() < 1e-3 { 3 } else { 0 }
487 ), 488 ),
488 PINK, 489 PINK,
@@ -1082,6 +1083,7 @@ impl<'ctx> AppState<'ctx> {
1082 } 1083 }
1083 } 1084 }
1084 } 1085 }
1086 self.cache();
1085 self.redraw(); 1087 self.redraw();
1086 } 1088 }
1087 } 1089 }