예제 #1
0
        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?");
                }
            }
        }
예제 #2
0
 Graphics IGraphicsHdcProvider.GetGraphics(bool create) => _event.GetGraphics(create);