pub enum TransformGestureEvent {
None,
Transform {
pan: Point,
zoom: f32,
centroid: Point,
pointer_count: usize,
},
Ended,
}Expand description
A transform step reported by TransformGesture::handle_event.
Variants§
None
Nothing to report for this event.
Transform
The tracked pointer set moved.
Fields
§
zoom: f32Multiplicative spread change since the previous sample
(1.0 when fewer than two pointers are down).
§
centroid: PointCentroid of all active pointers BEFORE this sample, in the same
coordinates as the pointer events. This is the anchor to zoom
about: applying display' = zoom * (display - centroid) + centroid + pan keeps the content glued to the fingers (it
matches Compose’s calculateCentroid(useCurrent = false)).
Ended
The last tracked pointer lifted; the gesture is over.
Trait Implementations§
Source§impl Clone for TransformGestureEvent
impl Clone for TransformGestureEvent
Source§fn clone(&self) -> TransformGestureEvent
fn clone(&self) -> TransformGestureEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TransformGestureEvent
Source§impl Debug for TransformGestureEvent
impl Debug for TransformGestureEvent
Source§impl PartialEq for TransformGestureEvent
impl PartialEq for TransformGestureEvent
impl StructuralPartialEq for TransformGestureEvent
Auto Trait Implementations§
impl Freeze for TransformGestureEvent
impl RefUnwindSafe for TransformGestureEvent
impl Send for TransformGestureEvent
impl Sync for TransformGestureEvent
impl Unpin for TransformGestureEvent
impl UnsafeUnpin for TransformGestureEvent
impl UnwindSafe for TransformGestureEvent
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