pub trait PlaceBboxMut: PlaceRectMut + Bbox {
    // Provided method
    fn place_bbox_mut(&mut self, mode: PlaceMode, pt: Point) { ... }
}
Expand description

A geometric shape that can be placed at a point using its bounding box.

§Examples

let mut rect1 = Rect::from_sides(0, 0, 100, 200);
rect1.place_bbox_mut(PlaceMode::Center, Point::new(25, 25));
assert_eq!(rect1, Rect::from_sides(-25, -75, 75, 125));

Provided Methods§

source

fn place_bbox_mut(&mut self, mode: PlaceMode, pt: Point)

Places an object at the given point using its bounding box.

For center alignments, the center’s non-integer coordinates are rounded down to the nearest integer. This behavior is subject to change and should not be relied upon.

Implementors§