pub struct EuvDrag {
pub x: f64,
pub y: f64,
pub delta_x: f64,
pub delta_y: f64,
pub travel: f64,
}Expand description
A single-finger drag described by the current position and the movement accumulated since the drag started.
Fields§
§x: f64Current X in client coordinates.
y: f64Current Y in client coordinates.
delta_x: f64X displacement since the drag started.
delta_y: f64Y displacement since the drag started.
travel: f64Total path length in CSS pixels, not the straight-line distance.
A finger that traces a loop has a large path length and zero delta, which is how a drag is told apart from a tap that wandered slightly.
Implementations§
Source§impl EuvDrag
impl EuvDrag
pub fn get_x(&self) -> f64
pub fn get_mut_x(&mut self) -> &mut f64
pub fn set_x(&mut self, val: f64) -> &mut Self
pub fn get_y(&self) -> f64
pub fn get_mut_y(&mut self) -> &mut f64
pub fn set_y(&mut self, val: f64) -> &mut Self
pub fn get_delta_x(&self) -> f64
pub fn get_mut_delta_x(&mut self) -> &mut f64
pub fn set_delta_x(&mut self, val: f64) -> &mut Self
pub fn get_delta_y(&self) -> f64
pub fn get_mut_delta_y(&mut self) -> &mut f64
pub fn set_delta_y(&mut self, val: f64) -> &mut Self
pub fn get_travel(&self) -> f64
pub fn get_mut_travel(&mut self) -> &mut f64
pub fn set_travel(&mut self, val: f64) -> &mut Self
Trait Implementations§
impl Copy for EuvDrag
impl StructuralPartialEq for EuvDrag
Auto Trait Implementations§
impl Freeze for EuvDrag
impl RefUnwindSafe for EuvDrag
impl Send for EuvDrag
impl Sync for EuvDrag
impl Unpin for EuvDrag
impl UnsafeUnpin for EuvDrag
impl UnwindSafe for EuvDrag
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