internal void ResetGraphics() { Graphics graphics = _event.GetGraphics(create: false); if (_event.Flags.HasFlag(DrawingEventFlags.SaveState) && graphics != null) { if (_savedGraphicsState != null) { graphics.Restore(_savedGraphicsState); _savedGraphicsState = null; } else { Debug.Fail("Called ResetGraphics more than once?"); } } }
Graphics IGraphicsHdcProvider.GetGraphics(bool create) => _event.GetGraphics(create);