lv_draw_sw.h

Functions

void lv_draw_sw_init(void)

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_deinit(void)

Deinitialize the SW renderers

void lv_draw_sw_fill(lv_draw_unit_t *draw_unit, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords)

Fill an area using SW render. Handle gradient and radius.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

  • coords – the coordinates of the rectangle

void lv_draw_sw_border(lv_draw_unit_t *draw_unit, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords)

Draw border with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

  • coords – the coordinates of the rectangle

void lv_draw_sw_box_shadow(lv_draw_unit_t *draw_unit, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords)

Draw box shadow with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

  • coords – the coordinates of the rectangle for which the box shadow should be drawn

void lv_draw_sw_image(lv_draw_unit_t *draw_unit, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords)

Draw an image with SW render. It handles image decoding, tiling, transformations, and recoloring.

Parameters:
  • draw_unit – pointer to a draw unit

  • draw_dsc – the draw descriptor

  • coords – the coordinates of the image

void lv_draw_sw_label(lv_draw_unit_t *draw_unit, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords)

Draw a label with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

  • coords – the coordinates of the label

void lv_draw_sw_arc(lv_draw_unit_t *draw_unit, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords)

Draw an arc with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

  • coords – the coordinates of the arc

void lv_draw_sw_line(lv_draw_unit_t *draw_unit, const lv_draw_line_dsc_t *dsc)

Draw a line with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

void lv_draw_sw_layer(lv_draw_unit_t *draw_unit, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords)

Blend a layer with SW render

Parameters:
  • draw_unit – pointer to a draw unit

  • draw_dsc – the draw descriptor

  • coords – the coordinates of the layer

void lv_draw_sw_triangle(lv_draw_unit_t *draw_unit, const lv_draw_triangle_dsc_t *dsc)

Draw a triangle with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

void lv_draw_sw_mask_rect(lv_draw_unit_t *draw_unit, const lv_draw_mask_rect_dsc_t *dsc, const lv_area_t *coords)

Mask out a rectangle with radius from a current layer

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor

  • coords – the coordinates of the mask

void lv_draw_sw_transform(lv_draw_unit_t *draw_unit, 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 cf, void *dest_buf)

Used internally to get a transformed are of an image

Parameters:
  • draw_unit – pointer to a draw unit

  • dest_area – area to calculate, i.e. get this area from the transformed image

  • src_buf – source buffer

  • src_w – source buffer width in pixels

  • src_h – source buffer height in pixels

  • src_stride – source buffer stride in bytes

  • draw_dsc – draw descriptor

  • sup – supplementary data

  • cf – color format of the source buffer

  • dest_buf – the destination buffer

void lv_draw_sw_vector(lv_draw_unit_t *draw_unit, const lv_draw_vector_task_dsc_t *dsc)

Draw vector graphics with SW render.

Parameters:
  • draw_unit – pointer to a draw unit

  • dsc – the draw descriptor