[−][src]Struct emath::align::Align2
Two-dimension alignment, e.g. Align2::LEFT_TOP
.
Implementations
impl Align2
[src]
pub const LEFT_BOTTOM: Align2
[src]
pub const LEFT_CENTER: Align2
[src]
pub const LEFT_TOP: Align2
[src]
pub const CENTER_BOTTOM: Align2
[src]
pub const CENTER_CENTER: Align2
[src]
pub const CENTER_TOP: Align2
[src]
pub const RIGHT_BOTTOM: Align2
[src]
pub const RIGHT_CENTER: Align2
[src]
pub const RIGHT_TOP: 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
impl RefUnwindSafe for Align2
[src]
impl Send for Align2
[src]
impl Sync for Align2
[src]
impl Unpin for Align2
[src]
impl UnwindSafe for Align2
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,