Functions | |
void | cucul_set_color (cucul_canvas_t *, unsigned char, unsigned char) |
Set the default colour pair. | |
void | cucul_set_truecolor (cucul_canvas_t *, unsigned int, unsigned int) |
Set the default colour pair (truecolor version). | |
char const * | cucul_get_color_name (unsigned int) |
Translate a colour index into the colour's name. | |
void | cucul_putchar (cucul_canvas_t *, int, int, char) |
Print an ASCII character. | |
void | cucul_putstr (cucul_canvas_t *, int, int, char const *) |
Print a string. | |
void | cucul_printf (cucul_canvas_t *, int, int, char const *,...) |
Print a formated string. | |
void | cucul_clear_canvas (cucul_canvas_t *, unsigned char) |
Clear the canvas. | |
void | cucul_blit (cucul_canvas_t *, int, int, cucul_canvas_t const *, cucul_canvas_t const *) |
Blit a canvas onto another one. |
|
This function sets the default ANSI colour pair. String functions such as caca_printf() and graphical primitive functions such as caca_draw_line() will use these colours. Color values are those defined in cucul.h, such as CUCUL_COLOR_RED or CUCUL_COLOR_TRANSPARENT.
|
|
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 colours. Colors are 16-bit ARGB values, each component being coded on 4 bits. For instance, 0xf088 is solid dark cyan (A=15 R=0 G=8 B=8), and 0x8fff is white with 50% alpha (A=8 R=15 G=15 B=15).
|
|
This function translates a cucul_color enum into a human-readable description string of the associated colour.
|
|
This function prints an ASCII character at the given coordinates, using the default foreground and background values. If the coordinates are outside the canvas boundaries, nothing is printed. If the character value is a non-printable character or is outside the ASCII range, it is replaced with a space. To print a sequence of bytes forming an UTF-8 character, use cucul_putstr() instead.
|
|
This function prints an UTF-8 string at the given coordinates, using the default foreground and background values. The coordinates may be outside the canvas boundaries (eg. a negative Y coordinate) and the string will be cropped accordingly if it is too long.
|
|
This function formats a string at the given coordinates, using the default foreground and background values. The coordinates may be outside the canvas 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 clears the canvas using the given background colour.
|
|
This function blits a canvas onto another one at the given coordinates. An optional mask canvas can be used.
|