private GdiGraphicsImpl(Image image, bool isStatic) : base(isStatic) { if (!isStatic) { _listenerGraphics = new GdiGraphicsListenerImpl(image, isStatic); } _graphics = Graphics.FromImage(image); }
protected override void Dispose(bool disposing) { if (_graphics != null) { _graphics.Dispose(); _graphics = null; } if (_listenerGraphics != null) { _listenerGraphics.Dispose(); _listenerGraphics = null; } base.Dispose(disposing); }