diff options
| author | Arne Dußin | 2020-12-20 03:58:46 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-12-20 16:41:52 +0100 |
| commit | 48f321a80970ebeb8374072b1d2e0a4d297aa348 (patch) | |
| tree | 8f6dbffef7ed507ae118919917fd69a7a9528c39 /src/map/mappable.rs | |
| parent | c073618d9773216ab4a2dcd7944589f38b1df751 (diff) | |
| download | graf_karto-48f321a80970ebeb8374072b1d2e0a4d297aa348.tar.gz graf_karto-48f321a80970ebeb8374072b1d2e0a4d297aa348.zip | |
Add dimensional indicator with scaling
Diffstat (limited to 'src/map/mappable.rs')
| -rw-r--r-- | src/map/mappable.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/mappable.rs b/src/map/mappable.rs index b348c4b..323361a 100644 --- a/src/map/mappable.rs +++ b/src/map/mappable.rs @@ -2,8 +2,8 @@ //! dimension on the map and may be scaleable use crate::math::Rect; -use crate::scaleable::Scaleable; use crate::transform::Transform; +use crate::transformable::NonRigidTransformable; use raylib::drawing::RaylibDrawHandle; pub trait Mappable { @@ -21,7 +21,11 @@ pub trait Mappable { /// Get the rectangle that contains the mappable object in its entirety without excess. fn bounding_rect(&self) -> Rect<f64>; - fn as_scaleable(&self) -> Option<&dyn Scaleable> { + fn as_non_rigid(&self) -> Option<&dyn NonRigidTransformable> { + None + } + + fn as_non_rigid_mut(&mut self) -> Option<&mut dyn NonRigidTransformable> { None } } |
