![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Recognizes two-finger pinch and spread gestures by listening to touch events from an ITouchInput source. Raises PinchUpdated each time the distance between the two active contact points changes, providing a relative scale delta. More...
Public Member Functions | |
| PinchGestureRecognizer (ITouchInput touchInput) | |
| Initializes a new instance of the PinchGestureRecognizer class, subscribing to touch events from the specified ITouchInput source. | |
| void | Dispose () |
| Releases all resources held by this recognizer and unsubscribes from the touch input source. After disposal, no further PinchUpdated events will be raised. | |
Events | |
| EventHandler< PinchedEventArgs >? | PinchStarted |
| Occurs when exactly two contacts establish a pinch gesture. | |
| EventHandler< PinchedEventArgs >? | PinchUpdated |
| Occurs whenever the distance between two active touch contact points changes during a pinch or spread gesture. The event data includes the relative scale delta and current distance. | |
| EventHandler< PinchedEventArgs >? | PinchEnded |
| Occurs when the current two-contact pinch ends or is interrupted. | |
Recognizes two-finger pinch and spread gestures by listening to touch events from an ITouchInput source. Raises PinchUpdated each time the distance between the two active contact points changes, providing a relative scale delta.
Subscribe to the PinchUpdated event to receive incremental scale updates as the user moves two fingers together or apart. A PinchedEventArgs.ScaleDelta greater than 1.0 means the fingers spread apart (expand), while a value less than 1.0 means they moved closer (contract).
All simultaneous contacts are tracked. Pinch updates are emitted only when exactly two contacts are active. If a third finger lands while two are tracked, updates pause until one lifts and exactly two remain — at which point the baseline distance is recomputed so there is no jump.
Definition at line 23 of file PinchGestureRecognizer.cs.
| Gondwana.Input.Touch.Gestures.PinchGestureRecognizer.PinchGestureRecognizer | ( | ITouchInput | touchInput | ) |
Initializes a new instance of the PinchGestureRecognizer class, subscribing to touch events from the specified ITouchInput source.
| touchInput | The touch input source to monitor for pinch gestures. Must not be null. |
| ArgumentNullException | Thrown when touchInput is null. |
Definition at line 53 of file PinchGestureRecognizer.cs.
| void Gondwana.Input.Touch.Gestures.PinchGestureRecognizer.Dispose | ( | ) |
Releases all resources held by this recognizer and unsubscribes from the touch input source. After disposal, no further PinchUpdated events will be raised.
Definition at line 178 of file PinchGestureRecognizer.cs.
| EventHandler<PinchedEventArgs>? Gondwana.Input.Touch.Gestures.PinchGestureRecognizer.PinchEnded |
Occurs when the current two-contact pinch ends or is interrupted.
Definition at line 41 of file PinchGestureRecognizer.cs.
| EventHandler<PinchedEventArgs>? Gondwana.Input.Touch.Gestures.PinchGestureRecognizer.PinchStarted |
Occurs when exactly two contacts establish a pinch gesture.
Definition at line 32 of file PinchGestureRecognizer.cs.
| EventHandler<PinchedEventArgs>? Gondwana.Input.Touch.Gestures.PinchGestureRecognizer.PinchUpdated |
Occurs whenever the distance between two active touch contact points changes during a pinch or spread gesture. The event data includes the relative scale delta and current distance.
Definition at line 38 of file PinchGestureRecognizer.cs.