Trait input::event::gesture::GesturePinchEventTrait
[−]
[src]
pub trait GesturePinchEventTrait: AsRaw<libinput_event_gesture> {
fn scale(&self) -> f64 { ... }
fn into_gesture_pinch_event(self) -> GesturePinchEvent where Self: Sized { ... }
}Common functions for pinch gesture events
Provided Methods
fn scale(&self) -> f64
Return the absolute scale of a pinch gesture, the scale is the division of the current distance between the fingers and the distance at the start of the gesture.
The scale begins at 1.0, and if e.g. the fingers moved together by 50% then the scale will become 0.5, if they move twice as far apart as initially the scale becomes 2.0, etc.
For gesture events that are of type GesturePinchBeginEvent, this function
returns 1.0.
For gesture events that are of type GesturePinchEndEvent, this function
returns the scale value of the most recent GesturePinchUpdateEvent event
(if any) or 1.0 otherwise.
fn into_gesture_pinch_event(self) -> GesturePinchEvent where Self: Sized
Convert into a general GesturePinchEvent
Implementors
impl GesturePinchEventTrait for GesturePinchEventimpl GesturePinchEventTrait for GesturePinchBeginEventimpl GesturePinchEventTrait for GesturePinchUpdateEventimpl GesturePinchEventTrait for GesturePinchEndEvent