Package com.jogamp.newt.event
Class PinchToZoomGesture.ZoomEvent
java.lang.Object
java.util.EventObject
com.jogamp.newt.event.NEWTEvent
com.jogamp.newt.event.InputEvent
com.jogamp.newt.event.GestureHandler.GestureEvent
com.jogamp.newt.event.PinchToZoomGesture.ZoomEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
- PinchToZoomGesture
A
GestureHandler.GestureEvent denominating zoom.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jogamp.newt.event.InputEvent
InputEvent.InputClass, InputEvent.InputType -
Field Summary
Fields inherited from class com.jogamp.newt.event.GestureHandler.GestureEvent
EVENT_GESTURE_DETECTEDFields inherited from class com.jogamp.newt.event.InputEvent
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_MASKFields inherited from class com.jogamp.newt.event.NEWTEvent
consumedTag -
Constructor Summary
ConstructorsConstructorDescriptionZoomEvent(Object source, long when, int modifiers, GestureHandler handler, MouseEvent pe, float zoom, float delta, float scale) -
Method Summary
Modifier and TypeMethodDescriptionfinal floatgetDelta()Delta to last zoom value lies within [-1..1].final floatgetScale()Returns the scale used to determine thezoomand hence it'sdeltavalue, which semantics depends on thepointer type'sMouseEvent.PointerClass.final floatgetZoom()Zoom value lies within [0..2], with 1 as 1:1.final StringtoString()Methods inherited from class com.jogamp.newt.event.GestureHandler.GestureEvent
getHandler, getTriggerMethods inherited from class com.jogamp.newt.event.InputEvent
getButtonDownCount, getButtonMask, getButtonsDown, getModifiers, getModifiersString, isAltDown, isAltGraphDown, isAnyButtonDown, isAutoRepeat, isButtonDown, isConfined, isControlDown, isInvisible, isMetaDown, isShiftDown, toStringMethods inherited from class com.jogamp.newt.event.NEWTEvent
getAttachment, getEventType, getWhen, isConsumed, setAttachment, setConsumed, toHexStringMethods inherited from class java.util.EventObject
getSource
-
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 thezoomand hence it'sdeltavalue, which semantics depends on thepointer type'sMouseEvent.PointerClass.For
MouseEvent.PointerClass.Offscreen, the scale is usually1.0fand 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. Hencescale * deltareproduces the screen distance in pixels the finger[s] have moved. -
toString
- Overrides:
toStringin classGestureHandler.GestureEvent
-