Class PinchToZoomGesture.ZoomEvent

All Implemented Interfaces:
Serializable
Enclosing class:
PinchToZoomGesture

public static class PinchToZoomGesture.ZoomEvent extends GestureHandler.GestureEvent
A GestureHandler.GestureEvent denominating zoom.
See Also:
  • Constructor Details

    • ZoomEvent

      public ZoomEvent(Object source, long when, int modifiers, GestureHandler handler, MouseEvent pe, float zoom, float delta, float scale)
  • Method Details

    • getZoom

      public final float getZoom()
      Zoom value lies within [0..2], with 1 as 1:1.
    • getDelta

      public final float getDelta()
      Delta to last zoom value lies within [-1..1].
    • getScale

      public final float getScale()
      Returns the scale used to determine the zoom and hence it's delta value, which semantics depends on the pointer type's MouseEvent.PointerClass.

      For MouseEvent.PointerClass.Offscreen, the scale is usually 1.0f and denominates an abstract value without association to a physical value.

      For MouseEvent.PointerClass.Onscreen, the scale varies and denominates the divisor of the distance the finger[s] have moved on the screen. Hence scale * delta reproduces the screen distance in pixels the finger[s] have moved.

    • toString

      public final String toString()
      Overrides:
      toString in class GestureHandler.GestureEvent