Creates canvas that writes direct to stdout
by default.
You can override destination stream with another Writable stream.
Also, you can specify custom width and height of viewport where cursor will render the frame.
Set the background color. This color is used for filling the whole cell in the TTY.
Color name, rgb, hex or none if you want to disable background filling
Toggle blink display mode.
Toggle bold display mode.
Toggle dim display mode.
Move the cursor down.
Erase the specified region. The region describes the rectangle shape which need to erase.
Erase current line.
Erase the entire screen.
Erase from current line to down.
Erase from current position to end of the line.
Erase from current position to start of the line.
Erase from current line to up.
Flush changes to the real terminal, taking only modified cells. Firstly, we get modified cells that have been affected by write method. Secondly, we compare these modified cells with the last frame. If cell has changes that doesn't equal to the cell from the last frame - write to the stream.
Set the foreground color. This color is used when text is rendering.
Color name, rgb, hex or none if you want to disable foreground filling
Get index of the virtual terminal representation from (x, y) coordinates.
Returns index in the buffer array
Get (x, y) coordinate from the virtual terminal pointer.
Index in the buffer
Returns an array [x, y]
Toggle hidden display mode.
Move the cursor left.
Move the cursor position relative to the current coordinates.
Offset by X coordinate
Offset by Y coordinate
Set the cursor position by absolute coordinates.
X coordinate
Y coordinate
Toggle reverse display mode.
Move the cursor right.
Toggle underlined display mode.
Move the cursor up.
Data to write to the terminal
Wrapper around new Canvas()
.
Generated using TypeDoc
Canvas implements low-level API to terminal control codes.
http://www.termsys.demon.co.uk/vtansi.htm
http://misc.flogisoft.com/bash/tip_colors_and_formatting
http://man7.org/linux/man-pages/man4/console_codes.4.html
http://www.x.org/docs/xterm/ctlseqs.pdf
http://wiki.bash-hackers.org/scripting/terminalcodes
1.0.0