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

            base.Dispose(disposing);
        }