diff --git a/src/region.rs b/src/region.rs index 9789967..9abc5e6 100644 --- a/src/region.rs +++ b/src/region.rs @@ -1,4 +1,4 @@ -use crate::Point; +use crate::{Object, Point}; use anyhow::{format_err, Error, Result}; use backtrace::Backtrace; use rand::Rng; @@ -46,6 +46,10 @@ impl Region { Ok(()) } + + pub fn rectangle(&self) -> Object { + Object::Rectangle(self.start, self.end) + } } pub struct RegionIterator {