Class PinchToZoomGesture.ZoomEvent

    • Constructor Detail

      • ZoomEvent

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

      • 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.