lv_arclabel.h

API reference for lv_arclabel.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_arclabel_private.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)
Parameters
NameTypeDescription
objlv_obj_t *Pointer to the arc label object.
textconst 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,...)
Parameters
NameTypeDescription
objlv_obj_t *The arc label object to set the text for.
fmtconst 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)
Parameters
NameTypeDescription
objlv_obj_t *Pointer to the arc label object.
textconst 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
startlv_value_precise_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
sizelv_value_precise_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
offsetint32_trotation angle

lv_arclabel_set_dir

Set the type of arc.

 
void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir)
Parameters
NameTypeDescription
objlv_obj_t *pointer to and arc label object
dirlv_arclabel_dir_tarc 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
enbooltrue: 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to the arc label object.
radiusuint32_tThe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
xuint32_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
yuint32_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
alignlv_arclabel_text_align_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
alignlv_arclabel_text_align_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
overflowlv_arclabel_overflow_tthe 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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an arc label object
overlapboolset the arc label's end overlap behavior

Enums

lv_arclabel_dir_t

NameValue
LV_ARCLABEL_DIR_CLOCKWISE0
LV_ARCLABEL_DIR_COUNTER_CLOCKWISE1
Used by 1 function
  • lv_arclabel_set_dir — param dir

lv_arclabel_text_align_t

NameValue
LV_ARCLABEL_TEXT_ALIGN_DEFAULT0
LV_ARCLABEL_TEXT_ALIGN_LEADING1
LV_ARCLABEL_TEXT_ALIGN_CENTER2
LV_ARCLABEL_TEXT_ALIGN_TRAILING3
Used by 2 functions
  • lv_arclabel_set_text_vertical_align — param align
  • lv_arclabel_set_text_horizontal_align — param align

lv_arclabel_overflow_t

NameDescription
LV_ARCLABEL_OVERFLOW_VISIBLEShow full text, may overflow object area
LV_ARCLABEL_OVERFLOW_ELLIPSISShow ellipsis (...) when text overflows
LV_ARCLABEL_OVERFLOW_CLIPClip text at arc boundary
Used by 1 function
  • lv_arclabel_set_overflow — param overflow

Macros

LV_ARCLABEL_DOT_NUM

 
#define LV_ARCLABEL_DOT_NUM 3

LV_ARCLABEL_DEFAULT_TEXT

 
#define LV_ARCLABEL_DEFAULT_TEXT "Arced Text"

Variables

lv_arclabel_class

 
const lv_obj_class_t lv_arclabel_class

Dependencies

Indirect dependencies

How is this guide?

Last updated on

On this page