pub struct ImagePosition {
pub x: f32,
pub y: f32,
}Expand description
Image alignment within container
Fields§
§x: f32Horizontal position (0.0 = left, 0.5 = center, 1.0 = right)
y: f32Vertical position (0.0 = top, 0.5 = center, 1.0 = bottom)
Implementations§
Source§impl ImagePosition
impl ImagePosition
pub const CENTER: Self
pub const TOP_LEFT: Self
pub const TOP_CENTER: Self
pub const TOP_RIGHT: Self
pub const CENTER_LEFT: Self
pub const CENTER_RIGHT: Self
pub const BOTTOM_LEFT: Self
pub const BOTTOM_CENTER: Self
pub const BOTTOM_RIGHT: Self
pub fn new(x: f32, y: f32) -> Self
Trait Implementations§
Source§impl Clone for ImagePosition
impl Clone for ImagePosition
Source§fn clone(&self) -> ImagePosition
fn clone(&self) -> ImagePosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImagePosition
impl Debug for ImagePosition
Source§impl Default for ImagePosition
impl Default for ImagePosition
Source§fn default() -> ImagePosition
fn default() -> ImagePosition
Returns the “default value” for a type. Read more
Source§impl PartialEq for ImagePosition
impl PartialEq for ImagePosition
impl Copy for ImagePosition
impl StructuralPartialEq for ImagePosition
Auto Trait Implementations§
impl Freeze for ImagePosition
impl RefUnwindSafe for ImagePosition
impl Send for ImagePosition
impl Sync for ImagePosition
impl Unpin for ImagePosition
impl UnsafeUnpin for ImagePosition
impl UnwindSafe for ImagePosition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more