diff --git a/src/core/film.rs b/src/core/film.rs index a674f1c..3cc5d3a 100644 --- a/src/core/film.rs +++ b/src/core/film.rs @@ -26,6 +26,14 @@ impl Film { } } + pub fn width(&self) -> u32 { + self.x + } + + pub fn height(&self) -> u32 { + self.y + } + pub fn pixel_ratio(&self, x: f32, y: f32) -> (f32, f32) { (x / self.x as f32, y / self.y as f32) }