![]() |
![]() |
![]() |
UCIL Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
void ucil_convert_color (ucil_color_t *src, ucil_color_t *dest); void ucil_draw_box (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x1, int y1, int x2, int y2); void ucil_draw_line (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x1, int y1, int x2, int y2); void ucil_draw_rect (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x1, int y1, int x2, int y2); void ucil_fill (unicap_data_buffer_t *data_buffer, ucil_color_t *color); void ucil_set_pixel (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x, int y);
void ucil_convert_color (ucil_color_t *src, ucil_color_t *dest);
Convert colors between colorspaces. The
colorspace
field of
dest needs to be set to the target
colorspace, like in this example:
src.colorspace = UCIL_COLORSPACE_RGB24; src.rgb24.r = 0xff; src.rgb24.g = 0xff; src.rgb24.b = 0xff; dest.colorspace = UCIL_COLORSPACE_YUV; ucil_convert_color( &dest, &src );
|
source color |
|
target color |
void ucil_draw_box (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x1, int y1, int x2, int y2);
Draws a box
|
target buffer |
|
an ucil_color_t. The colorspace of the color has to match the colorspace of the data_buffer. |
|
starting point of the box ( x position ) |
|
starting point of the box ( y position ) |
|
endpoint of the box ( x position ) |
|
endpoint of the box ( y position ) |
void ucil_draw_line (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x1, int y1, int x2, int y2);
Draws a line on the data buffer. The endpoints are clipped to the buffer dimensions
|
target buffer |
|
an ucil_color_t. The colorspace of the color has to match the colorspace of the data_buffer. |
|
starting point of the line ( x position ) |
|
starting point of the line ( y position ) |
|
endpoint of the line ( x position ) |
|
endpoint of the line ( y position ) |
void ucil_draw_rect (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x1, int y1, int x2, int y2);
Draws a rectangle filled with color.
|
target buffer |
|
an ucil_color_t. The colorspace of the color has to match the colorspace of the data_buffer. |
|
starting point of the rectangle ( x position ) |
|
starting point of the rectangle ( y position ) |
|
endpoint of the rectangle ( x position ) |
|
endpoint of the rectangle ( y position ) |
void ucil_fill (unicap_data_buffer_t *data_buffer, ucil_color_t *color);
Fill the buffer with a color.
|
target buffer |
|
an ucil_color_t. The colorspace of the color has to match the colorspace of the data_buffer. |
void ucil_set_pixel (unicap_data_buffer_t *data_buffer, ucil_color_t *color, int x, int y);
Draws a pixel on the data buffer.
|
target buffer |
|
an ucil_color_t. The colorspace of the color has to match the colorspace of the data_buffer. |
|
x position |
|
y position |