[][src]Struct emath::align::Align2

pub struct Align2(pub [Align; 2]);

Two-dimension alignment, e.g. Align2::LEFT_TOP.

Implementations

impl Align2[src]

impl Align2[src]

pub fn x(self) -> Align[src]

pub fn y(self) -> Align[src]

pub fn anchor_rect(self, rect: Rect) -> Rect[src]

Used e.g. to anchor a piece of text to a part of the rectangle. Give a position within the rect, specified by the aligns

pub fn align_size_within_rect(self, size: Vec2, frame: Rect) -> Rect[src]

e.g. center a size within a given frame

Trait Implementations

impl Clone for Align2[src]

impl Copy for Align2[src]

impl Debug for Align2[src]

impl PartialEq<Align2> for Align2[src]

impl StructuralPartialEq for Align2[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.