public static class PinchToZoomGesture.ZoomEvent extends GestureHandler.GestureEvent
GestureHandler.GestureEvent denominating zoom.InputEvent.InputClass, InputEvent.InputTypeEVENT_GESTURE_DETECTEDALT_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_MASKconsumedTag| 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, getTriggergetButtonDownCount, getButtonMask, getButtonsDown, getModifiers, getModifiersString, isAltDown, isAltGraphDown, isAnyButtonDown, isAutoRepeat, isButtonDown, isConfined, isControlDown, isInvisible, isMetaDown, isShiftDown, toStringgetAttachment, getEventType, getWhen, isConsumed, setAttachment, setConsumed, toHexStringgetSourcepublic 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.GestureEventCopyright 2010 JogAmp Community.