[−][src]Trait embedded_layout::prelude::RectExt
The trait that describes the extension methods.
Required methods
fn with_size(top_left: Point, size: Size) -> Rectangle
Create a new Rectangle
from a top left point and a Size
fn center_x(&self) -> i32
Return the horizontal center coordinate
Note: when an object's width is an even number, the returned center point will not be perfectly in the middle.
fn center_y(&self) -> i32
Return the vertical center coordinate
Note: when an object's height is an even number, the returned center point will not be perfectly in the middle.
fn center(&self) -> Point
Return the center point Note: when an object's width or height is an even number, the returned center point will not be perfectly in the middle.
fn enveloping(&self, other: &Rectangle) -> Rectangle
Return the bounding Rectangle
that encompasses both Rectangles