/// <summary> /// Calls <see cref="PointerDeviceState.SetSurfaceSize"/> and invokes the <see cref="SurfaceSizeChanged"/> event /// </summary> /// <param name="newSize">New size of the surface</param> protected void SetSurfaceSize(Vector2 newSize) { PointerState.SetSurfaceSize(newSize); SurfaceSizeChanged?.Invoke(this, new SurfaceSizeChangedEventArgs { NewSurfaceSize = newSize }); }
/// <summary> /// Handles the Graph Surface Size Changed event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The event arguments.</param> private void GraphSurface_SizeChanged(object sender, SizeChangedEventArgs e) { _size = new System.Drawing.SizeF((float)e.NewSize.Width, (float)e.NewSize.Height); _size_changed = true; SurfaceSizeChanged?.Invoke(this, new EventArgs()); }