lv_draw_sw.h
API reference for lv_draw_sw.h
Functions
lv_draw_sw_get_blend_handler
Get the blend handler for a color format.
lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf)| Name | Type | Description |
|---|---|---|
dest_cf | lv_color_format_t | color format |
Returns: lv_draw_sw_blend_handler_t — pointer to the blend handler or NULL if no handler is registered
lv_draw_sw_init
Initialize the SW renderer. Called in internally. It creates as many SW renderers as defined in LV_DRAW_SW_DRAW_UNIT_CNT
void lv_draw_sw_init(void)lv_draw_sw_deinit
Deinitialize the SW renderers
void lv_draw_sw_deinit(void)lv_draw_sw_fill
Fill an area using SW render. Handle gradient and radius.
void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | lv_draw_fill_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the rectangle |
lv_draw_sw_border
Draw border with SW render.
void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_border_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the rectangle |
lv_draw_sw_box_shadow
Draw box shadow with SW render.
void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_box_shadow_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the rectangle for which the box shadow should be drawn |
lv_draw_sw_image
Draw an image with SW render. It handles image decoding, tiling, transformations, and recoloring.
void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
draw_dsc | const lv_draw_image_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the image |
lv_draw_sw_letter
void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords)| Name | Type |
|---|---|
t | lv_draw_task_t * |
dsc | const lv_draw_letter_dsc_t * |
coords | const lv_area_t * |
lv_draw_sw_label
Draw a label with SW render.
void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_label_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the label |
lv_draw_sw_arc
Draw an arc with SW render.
void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_arc_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the arc |
lv_draw_sw_line
Draw a line with SW render.
void lv_draw_sw_line(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_line_dsc_t * | the draw descriptor |
lv_draw_sw_layer
Blend a layer with SW render
void lv_draw_sw_layer(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
draw_dsc | const lv_draw_image_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the coordinates of the layer |
lv_draw_sw_triangle
Draw a triangle with SW render.
void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_triangle_dsc_t * | the draw descriptor |
lv_draw_sw_blur
Blur an area with SW render
void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_blur_dsc_t * | the draw descriptor |
coords | const lv_area_t * | the area to blur |
lv_draw_sw_mask_rect
Mask out a rectangle with radius from a current layer
void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | const lv_draw_mask_rect_dsc_t * | the draw descriptor |
lv_draw_sw_transform
Used internally to get a transformed are of an image
void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t src_cf, void *dest_buf)| Name | Type | Description |
|---|---|---|
dest_area | const lv_area_t * | area to calculate, i.e. get this area from the transformed image |
src_buf | const void * | source buffer |
src_w | int32_t | source buffer width in pixels |
src_h | int32_t | source buffer height in pixels |
src_stride | int32_t | source buffer stride in bytes |
draw_dsc | const lv_draw_image_dsc_t * | draw descriptor |
sup | const lv_draw_image_sup_t * | supplementary data |
src_cf | lv_color_format_t | color format of the source buffer |
dest_buf | void * | the destination buffer |
lv_draw_sw_vector
Draw vector graphics with SW render.
void lv_draw_sw_vector(lv_draw_task_t *t, lv_draw_vector_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
t | lv_draw_task_t * | pointer to a draw task |
dsc | lv_draw_vector_dsc_t * | the draw descriptor |
lv_draw_sw_register_blend_handler
Register a custom blend handler for a color format. Handler will be called when blending a color or an image to a buffer with the given color format. At most one handler can be registered for a color format. Subsequent registrations will overwrite the previous handler.
bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler)| Name | Type | Description |
|---|---|---|
handler | lv_draw_sw_custom_blend_handler_t * | pointer to a blend handler |
Returns: bool — true if the handler was registered, false if the handler could not be registered
lv_draw_sw_unregister_blend_handler
Unregister a custom blend handler for a color format.
bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf)| Name | Type | Description |
|---|---|---|
dest_cf | lv_color_format_t | color format |
Returns: bool — true if a handler was unregistered, false if no handler was registered
Dependencies
lv_global.hlv_draw_dma2d_private.hlv_draw_nema_gfx_utils.hlv_draw_sw_blend_to_a8.hlv_draw_sw_blend_to_al88.hlv_draw_sw_blend_to_argb8888.hlv_draw_sw_blend_to_argb8888_premultiplied.hlv_draw_sw_blend_to_i1.hlv_draw_sw_blend_to_l8.hlv_draw_sw_blend_to_rgb565.hlv_draw_sw_blend_to_rgb565_swapped.hlv_draw_sw_blend_to_rgb888.hlv_draw_sw_grad.hlv_draw_sw_mask.hlv_draw_sw_private.hlvgl_private.h
Last updated on