Functions | |
cucul_dither_t * | cucul_create_dither (unsigned int, unsigned int, unsigned int, unsigned int, unsigned long int, unsigned long int, unsigned long int, unsigned long int) |
Create an internal dither object. | |
int | cucul_set_dither_palette (cucul_dither_t *, unsigned int r[], unsigned int g[], unsigned int b[], unsigned int a[]) |
Set the palette of an 8bpp dither object. | |
int | cucul_set_dither_brightness (cucul_dither_t *, float) |
Set the brightness of a dither object. | |
int | cucul_set_dither_gamma (cucul_dither_t *, float) |
Set the gamma of a dither object. | |
int | cucul_set_dither_contrast (cucul_dither_t *, float) |
Set the contrast of a dither object. | |
int | cucul_set_dither_invert (cucul_dither_t *, int) |
Invert colors of dither. | |
int | cucul_set_dither_antialias (cucul_dither_t *, char const *) |
Set dither antialiasing. | |
char const *const * | cucul_get_dither_antialias_list (cucul_dither_t const *) |
Get available antialiasing methods. | |
int | cucul_set_dither_color (cucul_dither_t *, char const *) |
Choose colours used for dithering. | |
char const *const * | cucul_get_dither_color_list (cucul_dither_t const *) |
Get available colour modes. | |
int | cucul_set_dither_charset (cucul_dither_t *, char const *) |
Choose characters used for dithering. | |
char const *const * | cucul_get_dither_charset_list (cucul_dither_t const *) |
Get available dither character sets. | |
int | cucul_set_dither_mode (cucul_dither_t *, char const *) |
Set dithering method. | |
char const *const * | cucul_get_dither_mode_list (cucul_dither_t const *) |
Get dithering methods. | |
int | cucul_dither_bitmap (cucul_canvas_t *, int, int, int, int, cucul_dither_t const *, void *) |
Dither a bitmap on the canvas. | |
int | cucul_free_dither (cucul_dither_t *) |
Free the memory associated with a dither. |
|
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 cucul_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:
|
|
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:
|
|
Set the brightness of dither. If an error occurs, -1 is returned and errno is set accordingly:
|
|
Set the gamma of dither. If an error occurs, -1 is returned and errno is set accordingly:
|
|
Set the contrast of dither. If an error occurs, -1 is returned and errno is set accordingly:
|
|
Invert colors of dither. This function never fails.
|
|
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:
|
|
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 cucul_set_dither_antialias(), and a string containing the natural language description for that antialiasing method. This function never fails.
|
|
Tell the renderer which colours should be used to render the bitmap. Valid values for
If an error occurs, -1 is returned and errno is set accordingly:
|
|
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 cucul_set_dither_color(), and a string containing the natural language description for that colour mode. This function never fails.
|
|
Tell the renderer which characters should be used to render the dither. Valid values for
If an error occurs, -1 is returned and errno is set accordingly:
|
|
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 cucul_set_dither_charset(), and a string containing the natural language description for that character set. This function never fails.
|
|
Tell the renderer which dithering method should be used. Dithering is necessary because the picture being rendered has usually far more colours than the available palette. Valid values for
If an error occurs, -1 is returned and errno is set accordingly:
|
|
Return a list of available dithering methods for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the dithering method, to be used with cucul_set_dither_dithering(), and a string containing the natural language description for that dithering method. This function never fails.
|
|
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.
|
|
Free the memory allocated by cucul_create_dither(). This function never fails.
|