|
|
|
|
|
- Overview
- Gesture variable
- Example
- Retrieving gesture information
The Gesture variable is used to retrieve gesture (sweep) parameters: direction, speed, distance, etc. This variable can be used: - in the swipe event of elements in a Looper control, to know the swipe direction.
- in multitouch events (zoom, scroll and swipe) to avoid declaring parameters in the events.
The Gesture variable includes the following elements: | | | Real Angle (expressed in degrees) corresponding to the inclination of an Apple Pencil in relation to the tablet plan. This variable is filled in the "Pressed/Left button down" event only. | | Real Azimuth angle (expressed in degrees) of an Apple Pencil in relation to the mark of current control. This variable is filled in the "Pressed/Left button down" event only. | | Integer constant
Direction of the gesture. Can correspond to one of the following constants:- BottomUp: Scan from bottom to top.
- RightLeft: Right-to-left scan.
- LeftRight: Left-to-right scan.
- UpDown: Scan from top to bottom.
This variable is filled in Scroll and Swipe events. | | In the case of scroll: displacement value (in pixels) in the direction indicated by Gesture.Direction. In the case of pinch zoom: value of the distance (in pixels) between the two points of contact. This variable is filled in Scroll and Pinch zoom events. | | Real Pressure during a press. This pressure can take a value included between 0,0 and 1,0. This variable is filled in the "Pressed/Left button down" event only. | | Real Maximum pressure during a press. This pressure can take a value included between 0,0 and 1,0. This variable is filled in the "Pressed/Left button down" event only. | | Integer Speed of the move in the direction specified by Gesture.Direction. This speed is expressed in pixels per second. This variable is filled in Swipe events. |
Retrieving gesture information
SWITCH Gesture.Direction
CASE RightToLeft: SEL_Direction = 1
CASE LeftToRight: SEL_Direction = 2
CASE TopToBottom: SEL_Direction = 3
CASE BottomToTop: SEL_Direction = 4
END
SAI_Vitesse = Gesture.Speed
SAI_Distance = Gesture.Distance
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|