From 48f321a80970ebeb8374072b1d2e0a4d297aa348 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Sun, 20 Dec 2020 03:58:46 +0100 Subject: Add dimensional indicator with scaling --- src/map/rect_room.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/map/rect_room.rs') 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 { 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) { - 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 { -- cgit v1.2.3-70-g09d2