|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
2 pointer zoom, a.k.a. More...
Classes | |
| class | ZoomEvent |
A GestureHandler.GestureEvent denominating zoom. More... | |
Public Member Functions | |
| PinchToZoomGesture (final NativeSurface surface, final boolean allowMorePointer) | |
| String | toString () |
| void | clear (final boolean clearStarted) |
| Clears state of handler, i.e. More... | |
| boolean | isWithinGesture () |
Returns true if within a gesture as detected by a previous process(InputEvent) command, which has not been cleared. More... | |
| boolean | hasGesture () |
Returns true if a previous process(InputEvent) command produced a gesture, which has not been cleared. More... | |
| InputEvent | getGestureEvent () |
Returns the corresponding InputEvent for the gesture as detected by a previous process(InputEvent), which has not been cleared. More... | |
| final float | getZoom () |
| Zoom value lies within [0..2], with 1 as 1:1. More... | |
| final void | setZoom (final float zoom) |
| Set zoom value within [0..2], with 1 as 1:1. More... | |
| boolean | process (final InputEvent in) |
Process the given InputEvent and returns true if it produced the gesture. More... | |
| void | clear (boolean clearStarted) |
| Clears state of handler, i.e. More... | |
| boolean | hasGesture () |
Returns true if a previous process(InputEvent) command produced a gesture, which has not been cleared. More... | |
| InputEvent | getGestureEvent () |
Returns the corresponding InputEvent for the gesture as detected by a previous process(InputEvent), which has not been cleared. More... | |
| boolean | isWithinGesture () |
Returns true if within a gesture as detected by a previous process(InputEvent) command, which has not been cleared. More... | |
| boolean | process (InputEvent e) |
Process the given InputEvent and returns true if it produced the gesture. More... | |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debug("Window.MouseEvent") |
Static Public Attributes inherited from com.jogamp.newt.event.GestureHandler | |
| static final boolean | DEBUG = Debug.debug("Window.MouseEvent") |
2 pointer zoom, a.k.a.
pinch to zoom, gesture handler processing MouseEvents while producing ZoomEvents if gesture is completed.
Zoom value lies within [0..2], with 1 as 1:1.
Definition at line 47 of file PinchToZoomGesture.java.
| com.jogamp.newt.event.PinchToZoomGesture.PinchToZoomGesture | ( | final NativeSurface | surface, |
| final boolean | allowMorePointer | ||
| ) |
| surface | the NativeSurface, which size is used to compute the relative zoom factor |
| allowMorePointer | if false, allow only 2 pressed pointers (safe and recommended), otherwise accept other pointer to be pressed. |
Definition at line 101 of file PinchToZoomGesture.java.
| void com.jogamp.newt.event.PinchToZoomGesture.clear | ( | final boolean | clearStarted | ) |
Clears state of handler, i.e.
resets all states incl. previous detected gesture.
| clearStarted | if true, also clears started state, otherwise stay within gesture - if appropriate. Staying within a gesture allows fluent continuous gesture sequence, e.g. for scrolling. |
Implements com.jogamp.newt.event.GestureHandler.
Definition at line 127 of file PinchToZoomGesture.java.
| InputEvent com.jogamp.newt.event.PinchToZoomGesture.getGestureEvent | ( | ) |
Returns the corresponding InputEvent for the gesture as detected by a previous process(InputEvent), which has not been cleared.
Otherwise returns null.
Only implemented for gestures mapping to InputEvents.
Implements com.jogamp.newt.event.GestureHandler.
Definition at line 149 of file PinchToZoomGesture.java.
| final float com.jogamp.newt.event.PinchToZoomGesture.getZoom | ( | ) |
Zoom value lies within [0..2], with 1 as 1:1.
Definition at line 154 of file PinchToZoomGesture.java.
| boolean com.jogamp.newt.event.PinchToZoomGesture.hasGesture | ( | ) |
Returns true if a previous process(InputEvent) command produced a gesture, which has not been cleared.
Otherwise returns false.
Implements com.jogamp.newt.event.GestureHandler.
Definition at line 144 of file PinchToZoomGesture.java.
| boolean com.jogamp.newt.event.PinchToZoomGesture.isWithinGesture | ( | ) |
Returns true if within a gesture as detected by a previous process(InputEvent) command, which has not been cleared.
Otherwise returns false.
Implements com.jogamp.newt.event.GestureHandler.
Definition at line 139 of file PinchToZoomGesture.java.
| boolean com.jogamp.newt.event.PinchToZoomGesture.process | ( | final InputEvent | e | ) |
Process the given InputEvent and returns true if it produced the gesture.
Otherwise returns false.
If a gesture was already detected previously and has not been cleared, method does not process the event and returns true.
Besides validation of the event's details, the handler may also validate the InputEvent.InputClass and/or InputEvent.InputType.
Implements com.jogamp.newt.event.GestureHandler.
Definition at line 163 of file PinchToZoomGesture.java.
| final void com.jogamp.newt.event.PinchToZoomGesture.setZoom | ( | final float | zoom | ) |
Set zoom value within [0..2], with 1 as 1:1.
Definition at line 158 of file PinchToZoomGesture.java.
| String com.jogamp.newt.event.PinchToZoomGesture.toString | ( | ) |
|
static |
Definition at line 48 of file PinchToZoomGesture.java.