mikroSDK Reference Manual
lv_draw_label.h
Go to the documentation of this file.
1
6
#ifndef LV_DRAW_LABEL_H
7
#define LV_DRAW_LABEL_H
8
9
#ifdef __cplusplus
10
extern
"C"
{
11
#endif
12
13
/*********************
14
* INCLUDES
15
*********************/
16
#include "
../misc/lv_bidi.h
"
17
#include "
../misc/lv_txt.h
"
18
#include "
../misc/lv_color.h
"
19
#include "
../misc/lv_style.h
"
20
21
/*********************
22
* DEFINES
23
*********************/
24
#define LV_DRAW_LABEL_NO_TXT_SEL (0xFFFF)
25
26
/**********************
27
* TYPEDEFS
28
**********************/
29
30
typedef
struct
{
31
const
lv_font_t
* font;
32
uint32_t sel_start;
33
uint32_t sel_end;
34
lv_color_t color;
35
lv_color_t sel_color;
36
lv_color_t sel_bg_color;
37
lv_coord_t line_space;
38
lv_coord_t letter_space;
39
lv_coord_t ofs_x;
40
lv_coord_t ofs_y;
41
lv_opa_t opa;
42
lv_base_dir_t bidi_dir;
43
lv_text_align_t align;
44
lv_text_flag_t flag;
45
lv_text_decor_t decor : 3;
46
lv_blend_mode_t blend_mode: 3;
47
}
lv_draw_label_dsc_t
;
48
54
typedef
struct
_lv_draw_label_hint_t
{
56
int32_t
line_start
;
57
59
int32_t
y
;
60
63
int32_t
coord_y
;
64
}
lv_draw_label_hint_t
;
65
66
struct
_lv_draw_ctx_t
;
67
/**********************
68
* GLOBAL PROTOTYPES
69
**********************/
70
71
LV_ATTRIBUTE_FAST_MEM
void
lv_draw_label_dsc_init(
lv_draw_label_dsc_t
* dsc);
72
82
LV_ATTRIBUTE_FAST_MEM
void
lv_draw_label
(
struct
_lv_draw_ctx_t
* draw_ctx,
const
lv_draw_label_dsc_t
* dsc,
83
const
lv_area_t
* coords,
const
char
* txt,
lv_draw_label_hint_t
* hint);
84
85
void
lv_draw_letter(
struct
_lv_draw_ctx_t
* draw_ctx,
const
lv_draw_label_dsc_t
* dsc,
const
lv_point_t
* pos_p,
86
uint32_t letter);
87
88
/***********************
89
* GLOBAL VARIABLES
90
***********************/
91
92
/**********************
93
* MACROS
94
**********************/
95
96
#ifdef __cplusplus
97
}
/*extern "C"*/
98
#endif
99
100
#endif
/*LV_DRAW_LABEL_H*/
lv_bidi.h
lv_color.h
lv_draw_label_hint_t
struct _lv_draw_label_hint_t lv_draw_label_hint_t
lv_draw_label
LV_ATTRIBUTE_FAST_MEM void lv_draw_label(struct _lv_draw_ctx_t *draw_ctx, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, const char *txt, lv_draw_label_hint_t *hint)
lv_style.h
lv_txt.h
_lv_draw_ctx_t
Definition
lv_draw.h:59
_lv_draw_label_hint_t
Definition
lv_draw_label.h:54
_lv_draw_label_hint_t::coord_y
int32_t coord_y
Definition
lv_draw_label.h:63
_lv_draw_label_hint_t::line_start
int32_t line_start
Definition
lv_draw_label.h:56
_lv_draw_label_hint_t::y
int32_t y
Definition
lv_draw_label.h:59
_lv_font_t
Definition
lv_font.h:64
lv_area_t
Definition
lv_area.h:43
lv_draw_label_dsc_t
Definition
lv_draw_label.h:30
lv_point_t
Definition
lv_area.h:37