Class TCastlePinchPanGestureRecognizer
Unit
Declaration
type TCastlePinchPanGestureRecognizer = class(TObject)
Description
This gesture recognizer detects pan and pinch gesture, as both use two fingers, but cannot be done at the same time (to have only one active recognizer).
Pass the input events using Press, Motion and Release functions, listen to recognized gestures in OnGestureChanged event.
Hierarchy
- TObject
- TCastlePinchPanGestureRecognizer
Overview
Methods
![]() |
constructor Create; |
![]() |
function Press(const Event: TInputPressRelease): boolean; |
![]() |
function Release(const Event: TInputPressRelease): boolean; |
![]() |
function Motion(const Event: TInputMotion; const Dpi: Single): boolean; |
Properties
![]() |
property Gesture: TCastleGestureType read FGesture; |
![]() |
property RecognizerState: TCastleGestureRecognizerState read FState; |
![]() |
property PanOffset: TVector2 read FPanOffset; |
![]() |
property PanOldOffset: TVector2 read FPanOldOffset; |
![]() |
property PinchScaleFactor: Single read FPinchScaleFactor; |
![]() |
property PinchCenter: TVector2 read FPinchCenter; |
![]() |
property OnGestureChanged: TNotifyEvent read FOnGestureChanged write FOnGestureChanged; |
Description
Methods
![]() |
constructor Create; |
|
gesture start finger positions | |
![]() |
function Press(const Event: TInputPressRelease): boolean; |
|
Functions to pass the input to the recognizer from some TInputListener. | |
![]() |
function Release(const Event: TInputPressRelease): boolean; |
![]() |
function Motion(const Event: TInputMotion; const Dpi: Single): boolean; |
Properties
![]() |
property Gesture: TCastleGestureType read FGesture; |
|
| |
![]() |
property RecognizerState: TCastleGestureRecognizerState read FState; |
|
Recognizer state. When not detected any gesture, it is in grstInvalid, grstStarted is when the gesture is first recognized, grstFinished is the last event of the recognized gesture, grstUpdate are all events between started and finished. As you get the OnGestureChanged event only when any gesture is recognized, you may ignore this | |
![]() |
property PanOffset: TVector2 read FPanOffset; |
|
Offset of the current pan gesture. To get the actual change, you have to calculate | |
![]() |
property PanOldOffset: TVector2 read FPanOldOffset; |
|
Previous pan gesture offset. | |
![]() |
property PinchScaleFactor: Single read FPinchScaleFactor; |
|
Scale factor of the pinch gesture. I.e. 1.0 = no change, >1.0 zoom in. | |
![]() |
property PinchCenter: TVector2 read FPinchCenter; |
|
Coordinates of the pinch gesture center. | |
![]() |
property OnGestureChanged: TNotifyEvent read FOnGestureChanged write FOnGestureChanged; |
|
Listen to this event to receive updates on recognized gestures. | |
Generated by PasDoc 0.16.0.
