FillRect() public method

public FillRect ( int x, int y, int w, int h ) : void
x int
y int
w int
h int
return void
Example #1
0
 protected override void OnPaint(ConsoleBitmap context)
 {
     base.OnPaint(context);
     if (HasFocus)
     {
         context.Pen = new ConsoleCharacter(' ', backgroundColor: Application.Theme.FocusColor);
         context.FillRect(0, 0, Width, Height);
     }
 }
Example #2
0
        internal void Paint(ConsoleBitmap context)
        {
            if (IsVisible == false)
            {
                return;
            }

            if (TransparentBackground == false)
            {
                context.Pen = new ConsoleCharacter(' ', null, Background);
                context.FillRect(0, 0, Width, Height);
            }

            OnPaint(context);
        }
Example #3
0
        /// <summary>
        /// Paints the progress bar
        /// </summary>
        /// <param name="context"></param>
        protected override void OnPaint(ConsoleBitmap context)
        {
            var loadProgressPixels = (int)(0.5 + (LoadProgressPosition * Width));
            var playCursorOffset   = (int)(0.5 + (PlayCursorPosition * Width));

            if (playCursorOffset == Width)
            {
                playCursorOffset--;
            }

            // draws the loading progress
            context.FillRect(new ConsoleCharacter(' ', null, LoadingProgressColor), 0, 0, loadProgressPixels, 1);

            if (ShowPlayCursor)
            {
                // draws the play cursor
                context.DrawPoint(new ConsoleCharacter(' ', null, PlayCursorColor), playCursorOffset, 0);
            }
        }
Example #4
0
        internal void Paint(ConsoleBitmap context)
        {
            if (IsVisible == false)
            {
                return;
            }

            if (TransparentBackground == false)
            {
                context.Pen = new ConsoleCharacter(' ', null, Background);
                context.FillRect(0, 0, Width, Height);
            }

            OnPaint(context);
            if (Recorder != null && Recorder.IsExpired == false && Width == context.Scope.Width && context.Scope.Height == Height)
            {
                Recorder.Window = context.Scope;
                Recorder.WriteFrame(context, false, RecorderTimestampProvider != null ? new TimeSpan?(RecorderTimestampProvider()) : new TimeSpan?());
            }
        }
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);
            }
        }
        internal void Paint(ConsoleBitmap context)
        {
            if (IsVisible == false)
            {
                return;
            }

            if (TransparentBackground == false)
            {
                context.Pen = new ConsoleCharacter(' ', null, Background);
                context.FillRect(0, 0, Width, Height);
            }

            OnPaint(context);
        }
Example #7
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);
            }
        }
 protected override void OnPaint(ConsoleBitmap context)
 {
     base.OnPaint(context);
     if (HasFocus)
     {
         context.Pen = new ConsoleCharacter(' ', backgroundColor: Application.Theme.FocusColor);
         context.FillRect(0, 0, Width, Height);
     }
 }