Functions | |
| void | caca_set_color (enum caca_color fgcolor, enum caca_color bgcolor) |
| Set the default colour pair. | |
| enum caca_color | caca_get_fg_color (void) |
| Get the current foreground colour. | |
| enum caca_color | caca_get_bg_color (void) |
| Get the current background colour. | |
| void | caca_putchar (int x, int y, char c) |
| Print a character. | |
| void | caca_putstr (int x, int y, char const *s) |
| Print a string. | |
| void | caca_printf (int x, int y, char const *format,...) |
| Format a string. | |
| void | caca_clear (void) |
| Clear the screen. | |
| int | caca_set_window_title (char const *title) |
| Set the window title. | |
| unsigned int | caca_get_window_width (void) |
| Get the window width. | |
| unsigned int | caca_get_window_height (void) |
| Get the window height. | |
| void | caca_set_delay (unsigned int usec) |
| Set the refresh delay. | |
| unsigned int | caca_get_rendertime (void) |
| Get the average rendering time. | |
| void | caca_refresh (void) |
| Flush pending changes and redraw the screen. | |
|
|
This function clears the screen using a black background. |
|
|
This function returns the current background colour that was set with caca_set_color().
|
|
|
This function returns the current foreground colour that was set with caca_set_color().
|
|
|
This function returns the average rendering time, which is the average measured time between two caca_refresh() calls, in microseconds. If constant framerate was activated by calling caca_set_delay(), the average rendering time will not be considerably shorter than the requested delay even if the real rendering time was shorter.
|
|
|
If libcaca runs in a window, get the usable window height. This value can be used for aspect ratio calculation. If libcaca does not run in a window or if there is no way to know the font size, assume a 6x10 font is being used. Note that the units are not necessarily pixels.
|
|
|
If libcaca runs in a window, get the usable window width. This value can be used for aspect ratio calculation. If libcaca does not run in a window or if there is no way to know the font size, assume a 6x10 font is being used. Note that the units are not necessarily pixels.
|
|
||||||||||||||||||||
|
This function formats a string at the given coordinates, using the default foreground and background values. The coordinates may be outside the screen boundaries (eg. a negative Y coordinate) and the string will be cropped accordingly if it is too long. The syntax of the format string is the same as for the C printf() function.
|
|
||||||||||||||||
|
This function prints a character at the given coordinates, using the default foreground and background values. If the coordinates are outside the screen boundaries, nothing is printed.
|
|
||||||||||||||||
|
This function prints a string at the given coordinates, using the default foreground and background values. The coordinates may be outside the screen boundaries (eg. a negative Y coordinate) and the string will be cropped accordingly if it is too long.
|
|
|
This function flushes all graphical operations and prints them to the screen. Nothing will show on the screen until caca_refresh() is called. If caca_set_delay() was called with a non-zero value, caca_refresh() will use that value to achieve constant framerate: if two consecutive calls to caca_refresh() are within a time range shorter than the value set with caca_set_delay(), the second call will wait a bit before performing the screen refresh. |
|
||||||||||||
|
This function sets the default colour pair. String functions such as caca_printf() and graphical primitive functions such as caca_draw_line() will use these colour pairs.
|
|
|
This function sets the refresh delay in microseconds. The refresh delay is used by caca_refresh() to achieve constant framerate. See the caca_refresh() documentation for more details. If the argument is zero, constant framerate is disabled. This is the default behaviour.
|
|
|
If libcaca runs in a window, try to change its title. This works with the X11 and Win32 drivers.
|