diff --git a/textium/src/geometry.rs b/textium/src/geometry.rs index b58a789..8ab5189 100644 --- a/textium/src/geometry.rs +++ b/textium/src/geometry.rs @@ -39,9 +39,12 @@ impl Rect /// Return the position of the left edge of the rectangle. #[inline(always)] pub fn left(&self) -> T {self.x} - /// Return the position of the bottom edge of the rectangle. + /// Return the position of the bottom edge of the rectangle (coord system with 0 at top). #[inline(always)] pub fn bottom(&self) -> T {self.y + self.h} + /// Return the position of the bottom edge of the rectangle (gl/mathematical coord system). + #[inline(always)] + pub fn gl_bottom(&self) -> T {self.y - self.h} /// Return the position of the right edge of the rectangle. #[inline(always)] pub fn right(&self) -> T {self.x + self.w}