lv_draw_label.h
API reference for lv_draw_label.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_draw_label_private.h
Functions
draw/lv_draw_label.h:173function
lv_draw_task_get_label_dsc
Try to get a label draw descriptor from a draw task.
lv_draw_label_dsc_t * lv_draw_task_get_label_dsc(lv_draw_task_t *task)| Name | Type | Description |
|---|---|---|
task | lv_draw_task_t * | draw task |
Returns: lv_draw_label_dsc_t * — the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_LABEL
Structs
struct
lv_draw_label_dsc_t
| Member | Type | Description |
|---|---|---|
base | lv_draw_dsc_base_t | |
text | const char * | The text to draw |
text_size | lv_point_t | The size of the text |
font | const lv_font_t * | The font to use. Fallback fonts are also handled. |
color | lv_color_t | Color of the text |
line_space | int32_t | Extra space between the lines |
letter_space | int32_t | Extra space between the characters |
ofs_x | int32_t | Offset the text with this value horizontally |
ofs_y | int32_t | Offset the text with this value vertically |
rotation | int32_t | Rotation of the letters in 0.1 degree unit |
sel_start | uint32_t | The first characters index for selection (not byte index). LV_DRAW_LABEL_NO_TXT_SEL for no selection |
sel_end | uint32_t | The last characters's index for selection (not byte index). LV_DRAW_LABEL_NO_TXT_SEL for no selection |
sel_color | lv_color_t | Color of the selected characters |
sel_bg_color | lv_color_t | Background color of the selected characters |
text_length | uint32_t | The number of characters to render. 0: means render until reaching the \0 termination. |
align | lv_text_align_t | The alignment of the text LV_TEXT_ALIGN_LEFT/RIGHT/CENTER |
bidi_dir | lv_base_dir_t | The base direction. Used when type setting Right-to-left (e.g. Arabic) texts |
opa | lv_opa_t | Opacity of the text in 0...255 range. LV_OPA_TRANSP, LV_OPA_10, LV_OPA_20, .. LV_OPA_COVER can be used as well |
outline_stroke_opa | lv_opa_t | Letter outline stroke opacity |
decor | lv_text_decor_t | Text decoration, e.g. underline |
flag | lv_text_flag_t | Some flags to control type setting |
text_local | uint8_t | 1: malloc a buffer and copy text there. 0: text will be valid during rendering. |
text_static | uint8_t | Indicate that the text is constant and its pointer can be safely saved e.g. in a cache. |
has_bided | uint8_t | 1: already executed lv_bidi_process_paragraph. 0: has not been executed lv_bidi_process_paragraph. |
hint | lv_draw_label_hint_t * | Pointer to an externally stored struct where some data can be cached to speed up rendering |
outline_stroke_color | lv_color_t | |
outline_stroke_width | int32_t |
Used by 12 functions
lv_obj_init_draw_label_dsc— paramdraw_dsclv_draw_eve_label— paramdsclv_draw_label_dsc_init— paramdsclv_draw_label— paramdsclv_draw_character— paramdsclv_draw_label_iterate_characters— paramdsclv_draw_nanovg_label— paramdsclv_draw_nema_gfx_label— paramdsclv_draw_dave2d_label— paramdsclv_draw_sdl_label— paramdsclv_draw_sw_label— paramdsclv_draw_vg_lite_label— paramdsc
struct
lv_draw_letter_dsc_t
| Member | Type | Description |
|---|---|---|
base | lv_draw_dsc_base_t | |
unicode | uint32_t | |
font | const lv_font_t * | |
color | lv_color_t | |
rotation | int32_t | |
scale_x | int32_t | |
scale_y | int32_t | |
skew_x | int32_t | |
skew_y | int32_t | |
pivot | lv_point_t | |
opa | lv_opa_t | |
decor | lv_text_decor_t | |
blend_mode | lv_blend_mode_t | |
outline_stroke_opa | lv_opa_t | |
outline_stroke_width | int32_t | |
outline_stroke_color | lv_color_t |
Used by 5 functions
lv_draw_letter_dsc_init— paramdsclv_draw_letter— paramdsclv_draw_nanovg_letter— paramdsclv_draw_sw_letter— paramdsclv_draw_vg_lite_letter— paramdsc
Typedefs
draw/lv_draw_label.h:153typedef
lv_draw_glyph_cb_t
typedef void(* lv_draw_glyph_cb_t) (lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area)Passed as a parameter to lv_draw_label_iterate_characters to draw the characters one by one
Used by 2 functions
lv_draw_label_iterate_characters— paramcblv_draw_unit_draw_letter— paramcb
Macros
LV_DRAW_LABEL_NO_TXT_SEL
#define LV_DRAW_LABEL_NO_TXT_SEL (0xFFFF)Dependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_draw_buf.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_image_decoder.hlv_image_dsc.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style_gen.hlv_symbol_def.hlv_tick.hlv_timer.hlv_types.h
How is this guide?
Last updated on