pub struct Offset {
pub x: f32,
pub y: f32,
}Expand description
2D translation vector in logical pixels.
§Examples
use ailloli_ui_core::Offset;
assert_eq!(Offset::new(2.0, -3.0), Offset { x: 2.0, y: -3.0 });Fields§
§x: f32Horizontal displacement; positive values point right.
y: f32Vertical displacement; positive values point down.
Implementations§
Trait Implementations§
impl Copy for Offset
impl StructuralPartialEq for Offset
Auto Trait Implementations§
impl Freeze for Offset
impl RefUnwindSafe for Offset
impl Send for Offset
impl Sync for Offset
impl Unpin for Offset
impl UnwindSafe for Offset
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