Trait embedded_graphics::drawable::Dimensions
source · pub trait Dimensions {
fn top_left(&self) -> Coord;
fn bottom_right(&self) -> Coord;
fn size(&self) -> UnsignedCoord;
}
Expand description
Adds the ability to get the dimensions/position of a graphics object
This should be implemented for all builtin embedded-graphics primitives and fonts. Third party implementations do not have to implement this trait as an object may not have a known size. If the object does have a known size, this trait should be implemented.
Required Methods
sourcefn bottom_right(&self) -> Coord
fn bottom_right(&self) -> Coord
Get the bottom right corner of the bounding box for an object
sourcefn size(&self) -> UnsignedCoord
fn size(&self) -> UnsignedCoord
Get the width and height for an object