//protected override void OnGotFocus(EventArgs e)
 //{
 //    s_dbugCount++;
 //    Console.WriteLine("focus" + s_dbugCount.ToString());
 //    base.OnGotFocus(e);
 //}
 protected override void OnVisibleChanged(EventArgs e)
 {
     //s_dbugCount++;
     //Console.WriteLine("focus" + s_dbugCount.ToString());
     _rootgfx.InvalidateRectArea(new PixelFarm.Drawing.Rectangle(0, 0, _rootgfx.Width, _rootgfx.Height));
     _rootgfx.FlushAccumGraphics();
     //#if DEBUG
     //            s_dbugCount++;
     //            Console.WriteLine("vis" + s_dbugCount.ToString());
     //#endif
     base.OnVisibleChanged(e);
 }
Beispiel #2
0
        void PrepareRenderAndFlushAccumGraphics()
        {
            //TODO: review here
            RootGraphic backup = GlobalRootGraphic.CurrentRootGfx;

            GlobalRootGraphic.CurrentRootGfx = _rootgfx;
            _rootgfx.PrepareRender();
            _rootgfx.FlushAccumGraphics();
            GlobalRootGraphic.CurrentRootGfx = backup;//restore
        }
Beispiel #3
0
 public override void PaintToOutputWindow(Rectangle invalidateArea)
 {
     if (_rootgfx != null)
     {
         if (invalidateArea.Width + invalidateArea.Height == 0)
         {
             //entire window
             //_rootgfx.InvalidateRectArea(new PixelFarm.Drawing.Rectangle(0, 0, _rootgfx.Width, _rootgfx.Height));
         }
         else
         {
             RootGraphic.InvalidateRectArea(_rootgfx, invalidateArea);
             _rootgfx.FlushAccumGraphics();
             //PaintToOutputWindow();
         }
     }
 }
 void PrepareRenderAndFlushAccumGraphics()
 {
     _rootGraphic.PrepareRender();
     _rootGraphic.FlushAccumGraphics();
 }