pub struct Alignment {
pub x: f32,
pub y: f32,
}Expand description
对齐枚举(Flutter 范式,值在每个轴 0.0..1.0)
x=0.0 左边缘,x=0.5 水平中心,x=1.0 右边缘。
y=0.0 顶部,y=0.5 垂直中心,y=1.0 底部。
Fields§
§x: f32§y: f32Implementations§
Source§impl Alignment
impl Alignment
pub const TOP_LEFT: Self
pub const TOP_CENTER: Self
pub const TOP_RIGHT: Self
pub const CENTER_LEFT: Self
pub const CENTER: Self
pub const CENTER_RIGHT: Self
pub const BOTTOM_LEFT: Self
pub const BOTTOM_CENTER: Self
pub const BOTTOM_RIGHT: Self
Trait Implementations§
impl Copy for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations§
impl Freeze for Alignment
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnsafeUnpin for Alignment
impl UnwindSafe for Alignment
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