diff --git a/libs/cramium-hal/src/minigfx.rs b/libs/cramium-hal/src/minigfx.rs index 1c0f9d202..00343732c 100644 --- a/libs/cramium-hal/src/minigfx.rs +++ b/libs/cramium-hal/src/minigfx.rs @@ -23,7 +23,7 @@ pub trait FrameBuffer { /// Clears the drawable buffer fn clear(&mut self); /// Returns the size of the frame buffer as a Point - fn resolution(&self) -> Point; + fn dimensions(&self) -> Point; } /// Style properties for an object diff --git a/libs/cramium-hal/src/sh1107.rs b/libs/cramium-hal/src/sh1107.rs index d26a493f3..a1e439c99 100644 --- a/libs/cramium-hal/src/sh1107.rs +++ b/libs/cramium-hal/src/sh1107.rs @@ -362,7 +362,7 @@ impl<'a> FrameBuffer for Oled128x128<'a> { } } - fn resolution(&self) -> Point { Point::new(COLUMN, ROW) } + fn dimensions(&self) -> Point { Point::new(COLUMN, ROW) } fn get_pixel(&mut self, p: Point) -> Option { if p.x > COLUMN || p.y > ROW || p.x < 0 || p.y < 0 { diff --git a/loader/src/platform/cramium/gfx.rs b/loader/src/platform/cramium/gfx.rs index 6407076ea..5c5d1f248 100644 --- a/loader/src/platform/cramium/gfx.rs +++ b/loader/src/platform/cramium/gfx.rs @@ -110,7 +110,7 @@ pub fn line(fb: &mut dyn FrameBuffer, l: Line, clip: Option, xor: boo let sy = if y0 < y1 { 1 } else { -1 }; let mut err = dx + dy; // error value e_xy loop { - if x0 >= 0 && y0 >= 0 && x0 < (fb.resolution().x as _) && y0 < (fb.resolution().y as _) { + if x0 >= 0 && y0 >= 0 && x0 < (fb.dimensions().x as _) && y0 < (fb.dimensions().y as _) { if clip.is_none() || (clip.unwrap().intersects_point(Point::new(x0, y0))) { if !xor { fb.put_pixel(Point::new(x0 as _, y0 as _), color);