Browse Source

textium: Rect: add gl_bottom()

master
Erin 8 years ago
parent
commit
239bbf6ec8
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      textium/src/geometry.rs

+ 4
- 1
textium/src/geometry.rs View File

@ -39,9 +39,12 @@ impl<T> Rect<T>
/// 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}


Loading…
Cancel
Save