/// <summary> /// Renderer should call this method before any control render. /// </summary> public void Clear() { for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { buffer[x, y] = new CHAR_INFO(); opacityMatrix[x, y] = 0; } } }
//private char[,] buffer = new char[80, 25]; private void initBuffer() { for ( int y = 0; y < height; y++ ) { for ( int x = 0; x < width; x++ ) { buffer[ y, x ] = new CHAR_INFO( ) {UnicodeChar = ' '}; } } }
public void Assign(CHAR_INFO charInfo) { canvas.buffer[y, x] = charInfo; }
public static extern bool WriteConsoleOutputCore(IntPtr hConsoleOutput, CHAR_INFO[,] lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion);