Struct dotrix_egui::Align2 [−]
Expand description
Two-dimension alignment, e.g. Align2::LEFT_TOP
.
Tuple Fields
0: [Align; 2]
Implementations
impl Align2
impl Align2
pub const LEFT_BOTTOM: Align2
pub const LEFT_CENTER: 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
impl Align2
impl Align2
pub fn anchor_rect(self, rect: Rect) -> Rect
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
pub fn align_size_within_rect(self, size: Vec2, frame: Rect) -> Rect
e.g. center a size within a given frame
pub fn pos_in_rect(self, frame: &Rect) -> Pos2
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Align2
impl UnwindSafe for Align2
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more