Struct emath::align::Align2 [−][src]
Two-dimension alignment, e.g. Align2::LEFT_TOP
.
Implementations
impl Align2
[src]
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]
impl Align2
[src]pub fn x(self) -> Align
[src]
pub fn y(self) -> Align
[src]
pub fn anchor_rect(self, rect: Rect) -> Rect
[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]
pub fn align_size_within_rect(self, size: Vec2, frame: Rect) -> Rect
[src]e.g. center a size within a given frame
pub fn pos_in_rect(self, frame: &Rect) -> Pos2
[src]
Trait Implementations
impl Copy for Align2
[src]
impl StructuralPartialEq for Align2
[src]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more