logo
pub trait OriginDimensions {
    fn size(&self) -> Size;
}
Expand description

Dimensions with top_left of the bounding box at (0, 0).

A blanket implementation of Dimensions is provided for all types that implement this trait. See the Dimensions trait documentation for more information about bounding boxes.

Implementation notes

This trait should be implemented instead of Dimensions if the top left corner of the bounding box will always be at the origin, which will be the case for most display drivers. Some types, like ImageDrawable, require a bounding box that starts at the origin and can only be used if OriginDimensions is implemented.

Required methods

Returns the size of the bounding box.

Implementors