aboutsummaryrefslogtreecommitdiff
path: root/src/map/rect_room.rs
diff options
context:
space:
mode:
authorArne Dußin2020-12-20 03:58:46 +0100
committerArne Dußin2020-12-20 16:41:52 +0100
commit48f321a80970ebeb8374072b1d2e0a4d297aa348 (patch)
tree8f6dbffef7ed507ae118919917fd69a7a9528c39 /src/map/rect_room.rs
parentc073618d9773216ab4a2dcd7944589f38b1df751 (diff)
downloadgraf_karto-48f321a80970ebeb8374072b1d2e0a4d297aa348.tar.gz
graf_karto-48f321a80970ebeb8374072b1d2e0a4d297aa348.zip
Add dimensional indicator with scaling
Diffstat (limited to 'src/map/rect_room.rs')
-rw-r--r--src/map/rect_room.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/map/rect_room.rs b/src/map/rect_room.rs
index 5008c63..ee184fb 100644
--- a/src/map/rect_room.rs
+++ b/src/map/rect_room.rs
@@ -1,7 +1,6 @@
use crate::colours::DEFAULT_COLOURS;
use crate::map::Mappable;
-use crate::math::{Rect, Vec2};
-use crate::scaleable::Scaleable;
+use crate::math::Rect;
use crate::transform::Transform;
use raylib::drawing::{RaylibDraw, RaylibDrawHandle};
use serde::Serialize;
@@ -47,21 +46,6 @@ impl Mappable for RectRoom {
fn bounding_rect(&self) -> Rect<f64> {
self.data.clone()
}
-
- fn as_scaleable(&self) -> Option<&dyn Scaleable> {
- Some(self as &dyn Scaleable)
- }
-}
-
-impl Scaleable for RectRoom {
- fn scale(&mut self, by: &Vec2<f64>) {
- if by.x < 0. || by.y < 0. {
- panic!("Cannot set dimensions with negative size");
- }
-
- self.data.x *= by.x;
- self.data.y *= by.y;
- }
}
impl Deref for RectRoom {