caca_dither(3caca) | libcaca | caca_dither(3caca) |
caca_dither - libcaca bitmap dithering
libcaca character font handling
__extern caca_dither_t * caca_create_dither (int,
int, int, int, uint32_t, uint32_t, uint32_t, uint32_t)
Create an internal dither object. __extern int caca_set_dither_palette
(caca_dither_t *, uint32_t r[], uint32_t g[], uint32_t b[], uint32_t
a[])
Set the palette of an 8bpp dither object. __extern int
caca_set_dither_brightness (caca_dither_t *, float)
Set the brightness of a dither object. __extern float
caca_get_dither_brightness (caca_dither_t const *)
Get the brightness of a dither object. __extern int
caca_set_dither_gamma (caca_dither_t *, float)
Set the gamma of a dither object. __extern float caca_get_dither_gamma
(caca_dither_t const *)
Get the gamma of a dither object. __extern int caca_set_dither_contrast
(caca_dither_t *, float)
Set the contrast of a dither object. __extern float
caca_get_dither_contrast (caca_dither_t const *)
Get the contrast of a dither object. __extern int
caca_set_dither_antialias (caca_dither_t *, char const *)
Set dither antialiasing. __extern char const *const *
caca_get_dither_antialias_list (caca_dither_t const *)
Get available antialiasing methods. __extern char const *
caca_get_dither_antialias (caca_dither_t const *)
Get current antialiasing method. __extern int caca_set_dither_color
(caca_dither_t *, char const *)
Choose colours used for dithering. __extern char const *const *
caca_get_dither_color_list (caca_dither_t const *)
Get available colour modes. __extern char const * caca_get_dither_color
(caca_dither_t const *)
Get current colour mode. __extern int caca_set_dither_charset
(caca_dither_t *, char const *)
Choose characters used for dithering. __extern char const *const *
caca_get_dither_charset_list (caca_dither_t const *)
Get available dither character sets. __extern char const *
caca_get_dither_charset (caca_dither_t const *)
Get current character set. __extern int caca_set_dither_algorithm
(caca_dither_t *, char const *)
Set dithering algorithm. __extern char const *const *
caca_get_dither_algorithm_list (caca_dither_t const *)
Get dithering algorithms. __extern char const *
caca_get_dither_algorithm (caca_dither_t const *)
Get current dithering algorithm. __extern int caca_dither_bitmap
(caca_canvas_t *, int, int, int, int, caca_dither_t const *,
void const *)
Dither a bitmap on the canvas. __extern int caca_free_dither
(caca_dither_t *)
Free the memory associated with a dither.
These functions provide high level routines for dither allocation and rendering.
Create a dither structure from its coordinates (depth, width, height and pitch) and pixel mask values. If the depth is 8 bits per pixel, the mask values are ignored and the colour palette should be set using the caca_set_dither_palette() function. For depths greater than 8 bits per pixel, a zero alpha mask causes the alpha values to be ignored.
If an error occurs, NULL is returned and errno is set accordingly:
Parameters
Returns
Set the palette of an 8 bits per pixel bitmap. Values should be between 0 and 4095 (0xfff).
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Set the brightness of dither.
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Get the brightness of the given dither object.
This function never fails.
Parameters
Returns
Set the gamma of the given dither object. A negative value causes colour inversion.
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Get the gamma of the given dither object.
This function never fails.
Parameters
Returns
Set the contrast of dither.
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Get the contrast of the given dither object.
This function never fails.
Parameters
Returns
Tell the renderer whether to antialias the dither. Antialiasing smoothens the rendered image and avoids the commonly seen staircase effect.
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Return a list of available antialiasing methods for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the antialiasing method to be used with caca_set_dither_antialias(), and a string containing the natural language description for that antialiasing method.
This function never fails.
Parameters
Returns
Return the given dither's current antialiasing method.
This function never fails.
Parameters
Returns
Tell the renderer which colours should be used to render the bitmap. Valid values for str are:
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Return a list of available colour modes for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the colour mode, to be used with caca_set_dither_color(), and a string containing the natural language description for that colour mode.
This function never fails.
Parameters
Returns
Return the given dither's current colour mode.
This function never fails.
Parameters
Returns
Tell the renderer which characters should be used to render the dither. Valid values for str are:
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Return a list of available character sets for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the character set, to be used with caca_set_dither_charset(), and a string containing the natural language description for that character set.
This function never fails.
Parameters
Returns
Return the given dither's current character set.
This function never fails.
Parameters
Returns
Tell the renderer which dithering algorithm should be used. Dithering is necessary because the picture being rendered has usually far more colours than the available palette. Valid values for str are:
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Return a list of available dithering algorithms for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the dithering algorithm, to be used with caca_set_dither_dithering(), and a string containing the natural language description for that algorithm.
This function never fails.
Parameters
Returns
Return the given dither's current dithering algorithm.
This function never fails.
Parameters
Returns
Dither a bitmap at the given coordinates. The dither can be of any size and will be stretched to the text area.
This function never fails.
Parameters
Returns
References CACA_BLACK, caca_get_attr(), caca_put_char(), caca_set_attr(), and caca_set_color_ansi().
Free the memory allocated by caca_create_dither().
This function never fails.
Parameters
Returns
Generated automatically by Doxygen for libcaca from the source code.
Tue Jul 12 2022 | Version 0.99.beta20 |