示例#1
0
        protected override void DrawChildren(IBatchedDrawingService drawingService)
        {
            splitterBar.Draw(drawingService);

            if (displayFirstPane && FirstPane != null)
            {
                var clipping = FirstPaneClippingRect();
                drawingService.PushScissorRectangle(clipping);
                FirstPane.Draw(drawingService);
                drawingService.PopScissorRectangle();
            }

            if (displaySecondPane && SecondPane != null)
            {
                drawingService.PushScissorRectangle(SecondPaneClippingRect());
                SecondPane.Draw(drawingService);
                drawingService.PopScissorRectangle();
            }
        }
 public static void DrawClipped(this IWidget w, IBatchedDrawingService ds)
 {
     ds.PushScissorRectangle(w.LayoutRect);
     try
     {
         w.Draw(ds);
     }
     finally
     {
         ds.PopScissorRectangle();
     }
 }
示例#3
0
 protected override void DrawChildren(IBatchedDrawingService drawingService)
 {
     if (Clip)
     {
         drawingService.PushScissorRectangle(ContentRect);
         try
         {
             base.DrawChildren(drawingService);
         }
         finally
         {
             drawingService.PopScissorRectangle();
         }
     }
     else
     {
         base.DrawChildren(drawingService);
     }
 }