Struct kicad_parse_gen::Bound
[−]
[src]
pub struct Bound { pub x1: f64, pub y1: f64, pub x2: f64, pub y2: f64, pub is_bounded: bool, }
A bounding box
Fields
x1: f64
smaller x
y1: f64
smaller y
x2: f64
bigger x
y2: f64
bigger y
is_bounded: bool
item is bounded
Methods
impl Bound
[src]
fn new(x1: f64, y1: f64, x2: f64, y2: f64) -> Bound
create a new bound
fn new_from_i64(x1: i64, y1: i64, x2: i64, y2: i64) -> Bound
create a new bound
fn update(&mut self, other: &Bound)
update the bound with another one
fn swap_if_needed(&mut self)
call this when you constructed a default bound and potentionally had zero updates