internal static void DispatchEvent(Native.SDL_Event e) { switch (e.Type) { case Native.SDL_EventType.MultiGesture: { MultiGesture?.Invoke(null, new MultiGestureEventArgs(e.Mgesture)); break; } case Native.SDL_EventType.DollarGesture: { DollarGesture?.Invoke(null, new DollarGestureEventArgs(e.Dgesture)); break; } case Native.SDL_EventType.DollarRecord: { DollarRecord?.Invoke(null, new DollarGestureEventArgs(e.Dgesture)); break; } default: throw new InvalidOperationException(); } }
/// <summary> /// Raises the <see cref="MultiGesture"/> event. /// </summary> /// <param name="x">The normalized x-coordinate of the gesture's centroid.</param> /// <param name="y">The normalized y-coordinate of the gesture's centroid.</param> /// <param name="theta">The amount that the fingers rotated during the gesture.</param> /// <param name="distance">The amount that the fingers pinched during the gesture.</param> /// <param name="fingers">The number of fingers involved in the gesture.</param> protected virtual void OnMultiGesture(Single x, Single y, Single theta, Single distance, Int32 fingers) { MultiGesture?.Invoke(this, x, y, theta, distance, fingers); }