Struct glyph_packer::Rect [] [src]

pub struct Rect {
    pub x: u32,
    pub y: u32,
    pub w: u32,
    pub h: u32,
}

Fields

x
y
w
h

Methods

impl Rect

fn new(x: u32, y: u32, w: u32, h: u32) -> Rect

fn new_with_points(x1: u32, y1: u32, x2: u32, y2: u32) -> Rect

fn top(&self) -> u32

fn bottom(&self) -> u32

fn left(&self) -> u32

fn right(&self) -> u32

fn area(&self) -> u32

fn intersects(&self, other: &Rect) -> bool

fn contains(&self, other: &Rect) -> bool

fn crop(&self, other: &Rect) -> Vec<Rect>

Trait Implementations

Derived Implementations

impl Clone for Rect

fn clone(&self) -> Rect

fn clone_from(&mut self, source: &Self)

impl Copy for Rect

impl PartialEq for Rect

fn eq(&self, __arg_0: &Rect) -> bool

fn ne(&self, __arg_0: &Rect) -> bool

impl Eq for Rect

impl Hash for Rect

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Debug for Rect

fn fmt(&self, __arg_0: &mut Formatter) -> Result