Struct texture_packer::Rect
[−]
[src]
pub struct Rect {
pub x: u32,
pub y: u32,
pub w: u32,
pub h: u32,
}Fields
x: u32
y: u32
w: u32
h: u32
Methods
impl Rect[src]
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 contains_point(&self, x: u32, y: u32) -> bool
fn is_outline(&self, x: u32, y: u32) -> bool
fn crop(&self, other: &Rect) -> Vec<Rect>
Trait Implementations
impl Clone for Rect[src]
fn clone(&self) -> Rect
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more