Struct svgbob::Loc
[−]
[src]
pub struct Loc { pub x: i32, pub y: i32, }
Fields
x: i32
y: i32
Methods
impl Loc
[src]
pub fn new(x: i32, y: i32) -> Loc
[src]
pub fn from_location(&self, location: &Location) -> Loc
[src]
pub fn top(&self) -> Loc
[src]
pub fn left(&self) -> Loc
[src]
pub fn bottom(&self) -> Loc
[src]
pub fn right(&self) -> Loc
[src]
pub fn top_left(&self) -> Loc
[src]
pub fn top_right(&self) -> Loc
[src]
pub fn bottom_left(&self) -> Loc
[src]
pub fn bottom_right(&self) -> Loc
[src]
pub fn get_range(&self, rx: i32, ry: i32) -> (Loc, Loc)
[src]
make a lower and upper bound loc with ry units top + ry units bottom rx units left + rx units right
Trait Implementations
impl Debug for Loc
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Loc
[src]
fn clone(&self) -> Loc
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more