public static class PinchToZoomGesture.ZoomEvent extends GestureHandler.GestureEvent
GestureHandler.GestureEvent
denominating zoom.InputEvent.InputClass, InputEvent.InputType
EVENT_GESTURE_DETECTED
ALT_GRAPH_MASK, ALT_MASK, AUTOREPEAT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, BUTTON4_MASK, BUTTON5_MASK, BUTTON6_MASK, BUTTON7_MASK, BUTTON8_MASK, BUTTON9_MASK, BUTTONALL_MASK, BUTTONLAST_MASK, CONFINED_MASK, CTRL_MASK, INVISIBLE_MASK, META_MASK, SHIFT_MASK
consumedTag
Constructor and Description |
---|
PinchToZoomGesture.ZoomEvent(Object source,
long when,
int modifiers,
GestureHandler handler,
MouseEvent pe,
float zoom,
float delta,
float scale) |
Modifier and Type | Method and Description |
---|---|
float |
getDelta()
Delta to last zoom value lies within [-1..1].
|
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 . |
float |
getZoom()
Zoom value lies within [0..2], with 1 as 1:1.
|
String |
toString() |
getHandler, getTrigger
getButtonDownCount, getButtonMask, getButtonsDown, getModifiers, getModifiersString, isAltDown, isAltGraphDown, isAnyButtonDown, isAutoRepeat, isButtonDown, isConfined, isControlDown, isInvisible, isMetaDown, isShiftDown, toString
getAttachment, getEventType, getWhen, isConsumed, setAttachment, setConsumed, toHexString
getSource
public PinchToZoomGesture.ZoomEvent(Object source, long when, int modifiers, GestureHandler handler, MouseEvent pe, float zoom, float delta, float scale)
public final float getZoom()
public final float getDelta()
public final float getScale()
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.
public final String toString()
toString
in class GestureHandler.GestureEvent
Copyright 2010 JogAmp Community.