Expand/Shrink

Console Graphics

The following routines let you display information on a console screen.

For "proper graphics" you need to use a GUI library such as xpGUI, which is included in the standard distribution.

None of these routines are supported by pwa/p2js, apart from a few that slipped through in a moment of weakness/madness (clear_screen, text_color, and bk_color). Legacy code which uses these routines tends to "busy loop" which is wholly inappropriate for a browser and must be event-driven instead - let me know if you find any such code that you need help converting to the latter.

allow_break allow control-c/control-Break to terminate your program or not
check_break check if user has pressed control-c or control-Break
clear_screen clear the screen
position set cursor line and column
get_position return cursor line and column
video_config return parameters of current mode
scroll scroll text up or down
wrap control line wrap at right edge of screen
text_color set foreground text color
bk_color set background color
read_bitmap read a bitmap (.bmp) file and return a palette and a 2-d sequence of pixels
save_bitmap create a bitmap (.bmp) file, given a palette and a 2-d sequence of pixels
cursor select cursor shape
text_rows set number of lines on text screen
get_screen_char get one character from the screen
put_screen_char put one or more characters on the screen
save_text_image save a rectangular region from a text screen
display_text_image display an image on the text screen
isatty Check whether stdin/stdout/stderr have been redirected.
free_console delete the console text window