char(3caca)

char3caca

Detailed Description

These functions provide low-level character printing routines.

Function Documentation

void caca_clear (void)

This function clears the screen using a black background.

enum caca_color caca_get_bg_color (void)

This function returns the current background colour that was set with caca_set_color().

Returns:

The current background colour.

char const* caca_get_color_name (enum caca_color color)

This function translates a caca_color enum into a human-readable description string of the associated colour.

Parameters:

color The colour value.

Returns:

A static string containing the colour's name.

enum caca_color caca_get_fg_color (void)

This function returns the current foreground colour that was set with caca_set_color().

Returns:

The current foreground colour.

void caca_printf (int x, int y, char const * format, ...)

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.

Parameters:

x X coordinate.
y Y coordinate.
format The format string to print.
... Arguments to the format string.

void caca_putchar (int x, int y, char c)

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.

Parameters:

x X coordinate.
y Y coordinate.
c The character to print.

void caca_putstr (int x, int y, char const * s)

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.

Parameters:

x X coordinate.
y Y coordinate.
s The string to print.

void caca_set_color (enum caca_color fgcolor, enum caca_color bgcolor)

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.

Parameters:

fgcolor The requested foreground colour.
bgcolor The requested background colour.

From libcaca-dev 0.9-4 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.