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.
Loading...
Searching...
No Matches
PinchedEventArgs.cs
2
7public sealed class PinchedEventArgs : EventArgs
8{
10 public PinchPhase Phase { get; }
11
13 public IReadOnlyList<int> TouchIds { get; }
14
16 public System.Drawing.PointF Center { get; }
17
19 public double StartingDistance { get; }
20
22 public double PreviousDistance { get; }
23
30 public double ScaleDelta { get; }
31
35 public double CurrentDistance { get; }
36
40 public double TotalScale { get; }
41
51 public PinchedEventArgs(double scaleDelta, double currentDistance)
52 {
53 Phase = PinchPhase.Updated;
54 TouchIds = Array.Empty<int>();
55 Center = System.Drawing.PointF.Empty;
56 StartingDistance = currentDistance;
57 PreviousDistance = scaleDelta != 0 ? currentDistance / scaleDelta : currentDistance;
58 CurrentDistance = currentDistance;
59 ScaleDelta = scaleDelta;
60 TotalScale = scaleDelta;
61 }
62
73 PinchPhase phase,
74 IReadOnlyList<int> touchIds,
75 System.Drawing.PointF center,
76 double startingDistance,
77 double previousDistance,
78 double currentDistance)
79 {
80 Phase = phase;
81 TouchIds = touchIds ?? throw new ArgumentNullException(nameof(touchIds));
82 Center = center;
83 StartingDistance = startingDistance;
84 PreviousDistance = previousDistance;
85 CurrentDistance = currentDistance;
86 ScaleDelta = previousDistance > 0 ? currentDistance / previousDistance : 1.0;
87 TotalScale = startingDistance > 0 ? currentDistance / startingDistance : 1.0;
88 }
89}
double StartingDistance
Gets the distance at which this pinch gesture began.
PinchedEventArgs(double scaleDelta, double currentDistance)
Initializes a new instance of the PinchedEventArgs class.
double TotalScale
Gets the scale relative to the beginning of the current pinch gesture.
PinchPhase Phase
Gets the lifecycle phase of this pinch event.
double ScaleDelta
Gets the scale factor relative to the previous pinch update. A value greater than 1....
double PreviousDistance
Gets the distance reported by the preceding pinch event.
IReadOnlyList< int > TouchIds
Gets the two contact IDs participating in the gesture.
double CurrentDistance
Gets the current distance in pixels between the two active touch contact points.
PinchedEventArgs(PinchPhase phase, IReadOnlyList< int > touchIds, System.Drawing.PointF center, double startingDistance, double previousDistance, double currentDistance)
Initializes complete pinch lifecycle data.
System.Drawing.PointF Center
Gets the midpoint between the two contacts in client coordinates.
PinchPhase
Identifies the lifecycle phase of a two-contact pinch gesture.
Definition PinchPhase.cs:7