Documentation for the ConsoleBuffer classbuffer = ConsoleBuffer(width, height, back_r=0, back_g=0, back_b=0, fore_r=0, fore_g=0, fore_b=0, char=' ')
Creates a ConsoleBuffer with specified size. Optionally, you can set the initial background color (R, G and B), foreground color, and character.
buffer.clear(back_r=0, back_g=0, back_b=0, fore_r=0, fore_g=0, fore_b=0, char=' ')
Clears the buffer with specified initial background color (R, G and B), foreground color, and character.
buffer.copy()
Returns an independent copy of the buffer (if you just used "buffer2 = buffer" both would point to the same buffer).
buffer.set_fore(x, y, r, g, b, char)
Sets the foreground color and character of a cell.
buffer.set_back(x, y, r, g, b)
Sets the background color of a cell.
buffer.set(x, y, back_r, back_g, back_b, fore_r, fore_g, fore_b, char)
Sets background color, foreground color and character of a cell, all at the same time.
buffer.blit(dest, fill_fore=True, fill_back=True)
Copies the results to a regular libtcod console. It must have the same size. If you don't need to copy the cells' foreground or background color, set the 2nd or 3rd argument to False, respectively.