Trait Rotation

Source
pub trait Rotation {
    // Required methods
    fn inverse(&self) -> Self;
    fn rotate_size(&self, size: Size) -> Size;
    fn rotate_point(&self, point: Point, bounds: Size) -> Point;
    fn rotate_rectangle(&self, rectangle: Rectangle, bounds: Size) -> Rectangle;
}

Required Methods§

Source

fn inverse(&self) -> Self

Returns the inverse rotation type.

Source

fn rotate_size(&self, size: Size) -> Size

Rotates the given size according to this rotation type.

Source

fn rotate_point(&self, point: Point, bounds: Size) -> Point

Rotates a point according to this rotation type, within overall bounds of the given size.

Source

fn rotate_rectangle(&self, rectangle: Rectangle, bounds: Size) -> Rectangle

Rotates a rectangle according to this rotation type, within overall bounds of the given size.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§