lv_arclabel.h
API reference for lv_arclabel.h
Functions
lv_arclabel_set_text
Set the text of the arc label.
This function sets the text displayed by an arc label object.
void lv_arclabel_set_text(lv_obj_t *obj, const char *text)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | Pointer to the arc label object. |
text | const char * | Pointer to a null-terminated string containing the new text for the label. |
lv_arclabel_set_text_fmt
Set the formatted text of an arc label object.
This function sets the text of an arc label object with support for variable arguments formatting, similar to printf.
void lv_arclabel_set_text_fmt(lv_obj_t *obj, const char *fmt,...)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | The arc label object to set the text for. |
fmt | const char * | A format string that specifies how subsequent arguments are converted to text. |
... |
lv_arclabel_set_text_static
Sets a new static text for the arc label or refreshes it with the current text. The 'text' must remain valid in memory; the arc label does not manage its lifecycle.
void lv_arclabel_set_text_static(lv_obj_t *obj, const char *text)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | Pointer to the arc label object. |
text | const char * | Pointer to the new text. If NULL, the label is refreshed with its current text. |
lv_arclabel_set_angle_start
Set the start angle of an arc. 0 deg: right, 90 bottom, etc.
void lv_arclabel_set_angle_start(lv_obj_t *obj, lv_value_precise_t start)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
start | lv_value_precise_t | the start angle. (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arclabel_set_angle_size
Set the end angle of an arc. 0 deg: right, 90 bottom, etc.
void lv_arclabel_set_angle_size(lv_obj_t *obj, lv_value_precise_t size)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
size | lv_value_precise_t | the angle size (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arclabel_set_offset
Set the rotation for the whole arc
void lv_arclabel_set_offset(lv_obj_t *obj, int32_t offset)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
offset | int32_t | rotation angle |
lv_arclabel_set_dir
Set the type of arc.
void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to and arc label object |
dir | lv_arclabel_dir_t | arc label's direction |
lv_arclabel_set_recolor
Enable the recoloring by in-line commands
void lv_arclabel_set_recolor(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
en | bool | true: enable recoloring, false: disable Example: "This is a #ff0000 red# word" |
lv_arclabel_set_radius
Set the radius for an arc label object.
void lv_arclabel_set_radius(lv_obj_t *obj, uint32_t radius)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the arc label object. |
radius | uint32_t | The radius value to set for the label's curvature, in pixels. |
lv_arclabel_set_center_offset_x
Set the center offset x for an arc label object.
void lv_arclabel_set_center_offset_x(lv_obj_t *obj, uint32_t x)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
x | uint32_t | the x offset |
lv_arclabel_set_center_offset_y
Set the center offset y for an arc label object.
void lv_arclabel_set_center_offset_y(lv_obj_t *obj, uint32_t y)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
y | uint32_t | the y offset |
lv_arclabel_set_text_vertical_align
Set the text vertical alignment for an arc label object.
void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
align | lv_arclabel_text_align_t | the vertical alignment |
lv_arclabel_set_text_horizontal_align
Set the text horizontal alignment for an arc label object.
void lv_arclabel_set_text_horizontal_align(lv_obj_t *obj, lv_arclabel_text_align_t align)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
align | lv_arclabel_text_align_t | the horizontal alignment |
lv_arclabel_set_overflow
Set the overflow behavior for an arc label object.
void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
overflow | lv_arclabel_overflow_t | the overflow mode (visible, ellipsis, clip) |
lv_arclabel_set_end_overlap
Set the end overlap behavior for an arc label object. This controls how text is handled when it would overlap at the end of a 360-degree arc.
void lv_arclabel_set_end_overlap(lv_obj_t *obj, bool overlap)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc label object |
overlap | bool | set the arc label's end overlap behavior |
Enums
lv_arclabel_dir_t
| Name | Value |
|---|---|
LV_ARCLABEL_DIR_CLOCKWISE | 0 |
LV_ARCLABEL_DIR_COUNTER_CLOCKWISE | 1 |
Used by 1 function
lv_arclabel_set_dir— paramdir
lv_arclabel_text_align_t
| Name | Value |
|---|---|
LV_ARCLABEL_TEXT_ALIGN_DEFAULT | 0 |
LV_ARCLABEL_TEXT_ALIGN_LEADING | 1 |
LV_ARCLABEL_TEXT_ALIGN_CENTER | 2 |
LV_ARCLABEL_TEXT_ALIGN_TRAILING | 3 |
Used by 2 functions
lv_arclabel_set_text_vertical_align— paramalignlv_arclabel_set_text_horizontal_align— paramalign
lv_arclabel_overflow_t
| Name | Description |
|---|---|
LV_ARCLABEL_OVERFLOW_VISIBLE | Show full text, may overflow object area |
LV_ARCLABEL_OVERFLOW_ELLIPSIS | Show ellipsis (...) when text overflows |
LV_ARCLABEL_OVERFLOW_CLIP | Clip text at arc boundary |
Used by 1 function
lv_arclabel_set_overflow— paramoverflow
Macros
LV_ARCLABEL_DOT_NUM
#define LV_ARCLABEL_DOT_NUM 3LV_ARCLABEL_DEFAULT_TEXT
#define LV_ARCLABEL_DEFAULT_TEXT "Arced Text"Variables
lv_arclabel_class
const lv_obj_class_t lv_arclabel_classDependencies
How is this guide?
Last updated on