Struct egui::Align2[]

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

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

Implementations

impl Align2

pub const LEFT_BOTTOM: Align2

pub const LEFT_CENTER: Align2

pub const LEFT_TOP: Align2

pub const CENTER_BOTTOM: Align2

pub const CENTER_CENTER: Align2

pub const CENTER_TOP: Align2

pub const RIGHT_BOTTOM: Align2

pub const RIGHT_CENTER: Align2

pub const RIGHT_TOP: Align2

impl Align2

pub fn x(self) -> Align

pub fn y(self) -> Align

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

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

e.g. center a size within a given frame

Trait Implementations

impl Clone for Align2

impl Copy for Align2

impl Debug for Align2

impl PartialEq<Align2> for Align2

impl StructuralPartialEq for Align2

Auto Trait Implementations

impl RefUnwindSafe for Align2

impl Send for Align2

impl Sync for Align2

impl Unpin for Align2

impl UnwindSafe for Align2

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.