StdPaint.ConsoleBuffer.ClearBrush C# (CSharp) Method

ClearBrush() public method

Fills the entire buffer with a brush.
public ClearBrush ( BufferBrush brush ) : void
brush BufferBrush The brush to fill the buffer with.
return void
        public unsafe void ClearBrush(BufferBrush brush)
        {
            for (int i = _width - 1; i >= 0; i--)
            for (int j = _height - 1; j >= 0; j--)
            {
                _buffer[j, i].ForeColor = brush.GetColor(i, j);
                _buffer[j, i].BackColor = brush.GetColor(i, j);
                _buffer[j, i].CharData = '\0';
            }
        }