Trait Region

Source
pub trait Region {
    // Required methods
    fn left(&self) -> i32;
    fn top(&self) -> i32;
    fn width(&self) -> u32;
    fn height(&self) -> u32;

    // Provided methods
    fn right(&self) -> i32 { ... }
    fn bottom(&self) -> i32 { ... }
    fn is_square(&self) -> bool { ... }
    fn contains(&self, x: i32, y: i32) -> bool { ... }
    fn center(&self) -> Point2<i32> { ... }
    fn top_left(&self) -> Point2<i32> { ... }
    fn square(&self) -> u32 { ... }
}

Required Methods§

Source

fn left(&self) -> i32

Source

fn top(&self) -> i32

Source

fn width(&self) -> u32

Source

fn height(&self) -> u32

Provided Methods§

Source

fn right(&self) -> i32

Source

fn bottom(&self) -> i32

Source

fn is_square(&self) -> bool

Source

fn contains(&self, x: i32, y: i32) -> bool

Source

fn center(&self) -> Point2<i32>

Source

fn top_left(&self) -> Point2<i32>

Source

fn square(&self) -> u32

Implementors§