GetScope() public method

public GetScope ( ) : Rectangle
return Rectangle
Example #1
0
 protected override void OnPaint(ConsoleBitmap context)
 {
     foreach (var control in Controls)
     {
         Rectangle scope = context.GetScope();
         try
         {
             context.Rescope(control.X, control.Y, control.Width, control.Height);
             control.Paint(context);
         }
         finally
         {
             context.Scope(scope);
         }
     }
 }
Example #2
0
 internal override void OnPaint(ConsoleBitmap context)
 {
     foreach (var control in Controls)
     {
         Rectangle scope = context.GetScope();
         try
         {
             context.Rescope(control.X, control.Y, control.Width, control.Height);
             control.Paint(context);
         }
         finally
         {
             context.Scope(scope);
         }
     }
 }
Example #3
0
 protected override void OnPaint(ConsoleBitmap context)
 {
     foreach (var control in GetPaintOrderedControls())
     {
         Rectangle scope = context.GetScope();
         try
         {
             context.Rescope(control.X, control.Y, control.Width, control.Height);
             if (control.Width > 0 && control.Height > 0)
             {
                 control.Paint(context);
             }
         }
         finally
         {
             context.Scope(scope);
         }
     }
 }
Example #4
0
        internal void Paint(ConsoleBitmap context)
        {
            Rectangle scope = context.GetScope();

            if (Background != ConsoleControl.TransparantColor)
            {
                context.Pen = Background;
                context.FillRect(0, 0, Width, Height);
            }

            try
            {
                context.Rescope(this.X, this.Y, this.Width, this.Height);
                context.Pen = this.Foreground;
                OnPaint(context);
            }
            finally
            {
                context.Scope(scope);
            }
        }
Example #5
0
        internal void Paint(ConsoleBitmap context)
        {
            Rectangle scope = context.GetScope();

            if (Background != ConsoleControl.TransparantColor)
            {
                context.Pen = Background;
                context.FillRect(0, 0, Width, Height);
            }

            try
            {
                context.Rescope(this.X, this.Y, this.Width, this.Height);
                context.Pen = this.Foreground;
                OnPaint(context);
            }
            finally
            {
                context.Scope(scope);
            }
        }