pub struct EuvPinch {
pub distance: f64,
pub start_distance: f64,
pub center_x: f64,
pub center_y: f64,
pub delta: f64,
}Expand description
A two-finger pinch described by the distance and midpoint of the two touch points.
The pair is emitted on every touchmove while exactly two fingers are
down, so consumers can drive a continuous zoom rather than reacting to a
discrete end-of-gesture event.
Fields§
§distance: f64Distance in CSS pixels between the two touch points.
start_distance: f64Distance in CSS pixels when the pinch started, or the previous distance when continuing an in-progress pinch.
center_x: f64Midpoint X in client coordinates.
center_y: f64Midpoint Y in client coordinates.
delta: f64Change in distance since start_distance.
Positive values mean the fingers spread apart (zoom in), negative values mean they moved together (zoom out).
Implementations§
Source§impl EuvPinch
impl EuvPinch
pub fn get_distance(&self) -> f64
pub fn get_mut_distance(&mut self) -> &mut f64
pub fn set_distance(&mut self, val: f64) -> &mut Self
pub fn get_start_distance(&self) -> f64
pub fn get_mut_start_distance(&mut self) -> &mut f64
pub fn set_start_distance(&mut self, val: f64) -> &mut Self
pub fn get_center_x(&self) -> f64
pub fn get_mut_center_x(&mut self) -> &mut f64
pub fn set_center_x(&mut self, val: f64) -> &mut Self
pub fn get_center_y(&self) -> f64
pub fn get_mut_center_y(&mut self) -> &mut f64
pub fn set_center_y(&mut self, val: f64) -> &mut Self
pub fn get_delta(&self) -> f64
pub fn get_mut_delta(&mut self) -> &mut f64
pub fn set_delta(&mut self, val: f64) -> &mut Self
Trait Implementations§
impl Copy for EuvPinch
impl StructuralPartialEq for EuvPinch
Auto Trait Implementations§
impl Freeze for EuvPinch
impl RefUnwindSafe for EuvPinch
impl Send for EuvPinch
impl Sync for EuvPinch
impl Unpin for EuvPinch
impl UnsafeUnpin for EuvPinch
impl UnwindSafe for EuvPinch
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