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); } }
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); }
/// <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); } }
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?()); } }
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); } }