lv_draw_rect.h

Defines

LV_RADIUS_CIRCLE

A very big radius to always draw as circle

Functions

void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t *dsc)
void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t *dsc)
void lv_draw_border_dsc_init(lv_draw_border_dsc_t *dsc)
void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t *dsc)
void lv_draw_bg_image_dsc_init(lv_draw_bg_image_dsc_t *dsc)
void lv_draw_rect(struct _lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords)

Draw a rectangle

Parameters:
  • draw_ctx -- pointer to the current draw context

  • dsc -- pointer to an initialized lv_draw_rect_dsc_t variable

  • coords -- the coordinates of the rectangle

struct lv_draw_rect_dsc_t

Public Members

lv_draw_dsc_base_t base
lv_coord_t radius
lv_opa_t bg_opa
lv_color_t bg_color

First element of a gradient is a color, so it maps well here

lv_grad_dsc_t bg_grad
const void *bg_image_src
const void *bg_image_symbol_font
lv_color_t bg_image_recolor
lv_opa_t bg_image_opa
lv_opa_t bg_image_recolor_opa
uint8_t bg_image_tiled
lv_color_t border_color
lv_coord_t border_width
lv_opa_t border_opa
lv_border_side_t border_side
uint8_t border_post
lv_color_t outline_color
lv_coord_t outline_width
lv_coord_t outline_pad
lv_opa_t outline_opa
lv_color_t shadow_color
lv_coord_t shadow_width
lv_coord_t shadow_ofs_x
lv_coord_t shadow_ofs_y
lv_coord_t shadow_spread
lv_opa_t shadow_opa
struct lv_draw_fill_dsc_t
struct lv_draw_bg_image_dsc_t

Public Members

lv_draw_dsc_base_t base
lv_coord_t radius
const void *src
const void *font
lv_color_t recolor
lv_opa_t opa
lv_opa_t recolor_opa
lv_image_header_t img_header
uint8_t tiled
struct lv_draw_border_dsc_t
struct lv_draw_box_shadow_dsc_t

Public Members

lv_draw_dsc_base_t base
lv_coord_t radius
lv_color_t color
lv_coord_t width
lv_coord_t spread
lv_coord_t ofs_x
lv_coord_t ofs_y
lv_opa_t opa
uint8_t bg_cover