pub struct Footprint {
pub min: Pos,
pub max: Pos,
}Expand description
The rectangle a drawing reaches: the smallest and largest coordinates stamped into it.
Two positions rather than an origin and a Size, because min is a point in the plane and
may be negative while the distance between the two is a magnitude: a span of u16::MAX + 1 cells
exists and no Size holds it, and a caller that wants the distance can derive it and decide what
to do about the one span that does not fit. A drawing that stamped nothing reaches nothing, which
is a state of its own rather than a rectangle at the origin.
Fields§
§min: PosThe smallest coordinate stamped, on both axes: the top-left corner, since y grows down.
max: PosThe largest coordinate stamped, on both axes.
Trait Implementations§
impl Copy for Footprint
impl Eq for Footprint
impl StructuralPartialEq for Footprint
Auto Trait Implementations§
impl Forget for Footprint
impl Freeze for Footprint
impl RefUnwindSafe for Footprint
impl Send for Footprint
impl Sync for Footprint
impl Unpin for Footprint
impl UnsafeUnpin for Footprint
impl UnwindSafe for Footprint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more