PowerArgs.Cli.ConsoleBitmap.ConsoleBitmap C# (CSharp) Method

ConsoleBitmap() public method

public ConsoleBitmap ( Rectangle bounds, ConsoleCharacter bg = null ) : System
bounds Rectangle
bg ConsoleCharacter
return System
        public ConsoleBitmap(Rectangle bounds, ConsoleCharacter? bg = null)
        {
            _syncLock = new object();
            this.Top = bounds.Y;
            this.Left = bounds.X;

            bounds = new Rectangle(0, 0, bounds.Width, bounds.Height);

            this.Bounds = bounds;
            this.scope = bounds;
            this.Console = ConsoleProvider.Current;
            this.lastBufferWidth = this.Console.BufferWidth;
            this.Background = bg.HasValue ? bg.Value : new ConsoleCharacter(' ');
            this.Pen = new ConsoleCharacter('*');
            pixels = new ConsolePixel[this.Width][];
            for (int x = 0; x < this.Width; x++)
            {
                pixels[x] = new ConsolePixel[this.Height];
                for (int y = 0; y < pixels[x].Length; y++)
                {
                    pixels[x][y] = new ConsolePixel() { Value = bg };
                }
            }
        }

Same methods

ConsoleBitmap::ConsoleBitmap ( int x, int y, int w, int h, ConsoleCharacter bg = null ) : System