lv_arc.h
API reference for lv_arc.h
Functions
lv_arc_set_start_angle
Set the start angle of an arc. 0 deg: right, 90 bottom, etc.
void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
start | lv_value_precise_t | the start angle. (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arc_set_end_angle
Set the end angle of an arc. 0 deg: right, 90 bottom, etc.
void lv_arc_set_end_angle(lv_obj_t *obj, lv_value_precise_t end)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
end | lv_value_precise_t | the end angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arc_set_angles
Set the start and end angles
void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
start | lv_value_precise_t | the start angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
end | lv_value_precise_t | the end angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arc_set_bg_start_angle
Set the start angle of an arc background. 0 deg: right, 90 bottom, etc.
void lv_arc_set_bg_start_angle(lv_obj_t *obj, lv_value_precise_t start)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
start | lv_value_precise_t | the start angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arc_set_bg_end_angle
Set the start angle of an arc background. 0 deg: right, 90 bottom etc.
void lv_arc_set_bg_end_angle(lv_obj_t *obj, lv_value_precise_t end)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
end | lv_value_precise_t | the end angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arc_set_bg_angles
Set the start and end angles of the arc background
void lv_arc_set_bg_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
start | lv_value_precise_t | the start angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
end | lv_value_precise_t | the end angle (if LV_USE_FLOAT is enabled it can be fractional too.) |
lv_arc_set_rotation
Set the rotation for the whole arc
void lv_arc_set_rotation(lv_obj_t *obj, int32_t rotation)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
rotation | int32_t | rotation angle |
lv_arc_set_mode
Set in which direction the indicator should grow.
void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to arc object |
type | lv_arc_mode_t | arc's mode |
lv_arc_set_value
Set a new value on the arc
void lv_arc_set_value(lv_obj_t *obj, int32_t value)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
value | int32_t | new value |
lv_arc_set_range
Set minimum and the maximum values of an arc
void lv_arc_set_range(lv_obj_t *obj, int32_t min, int32_t max)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the arc object |
min | int32_t | minimum value |
max | int32_t | maximum value |
lv_arc_set_min_value
Set the minimum values of an arc
void lv_arc_set_min_value(lv_obj_t *obj, int32_t min)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the arc object |
min | int32_t | minimum value |
lv_arc_set_max_value
Set the maximum values of an arc
void lv_arc_set_max_value(lv_obj_t *obj, int32_t max)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the arc object |
max | int32_t | maximum value |
lv_arc_set_change_rate
Set a change rate to limit the speed how fast the arc should reach the pressed point.
void lv_arc_set_change_rate(lv_obj_t *obj, uint32_t rate)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
rate | uint32_t | the change rate |
lv_arc_set_knob_offset
Set an offset angle for the knob
void lv_arc_set_knob_offset(lv_obj_t *obj, int32_t offset)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
offset | int32_t | knob offset from main arc in degrees |
lv_arc_get_angle_start
Get the start angle of an arc.
lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
Returns: lv_value_precise_t — the start angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
lv_arc_get_angle_end
Get the end angle of an arc.
lv_value_precise_t lv_arc_get_angle_end(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
Returns: lv_value_precise_t — the end angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
lv_arc_get_bg_angle_start
Get the start angle of an arc background.
lv_value_precise_t lv_arc_get_bg_angle_start(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
Returns: lv_value_precise_t — the start angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
lv_arc_get_bg_angle_end
Get the end angle of an arc background.
lv_value_precise_t lv_arc_get_bg_angle_end(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
Returns: lv_value_precise_t — the end angle [0..360] (if LV_USE_FLOAT is enabled it can be fractional too.)
lv_arc_get_value
Get the value of an arc
int32_t lv_arc_get_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
Returns: int32_t — the value of the arc
lv_arc_get_min_value
Get the minimum value of an arc
int32_t lv_arc_get_min_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
Returns: int32_t — the minimum value of the arc
lv_arc_get_max_value
Get the maximum value of an arc
int32_t lv_arc_get_max_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
Returns: int32_t — the maximum value of the arc
lv_arc_get_mode
Get whether the arc is type or not.
lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
Returns: lv_arc_mode_t — arc's mode
lv_arc_get_rotation
Get the rotation for the whole arc
int32_t lv_arc_get_rotation(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
Returns: int32_t — arc's current rotation
lv_arc_get_knob_offset
Get the current knob angle offset
int32_t lv_arc_get_knob_offset(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
Returns: int32_t — arc's current knob offset
lv_arc_get_change_rate
Get the change rate of an arc
uint32_t lv_arc_get_change_rate(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an arc object |
Returns: uint32_t — the change rate
lv_arc_create
Create an arc object
lv_obj_t * lv_arc_create(lv_obj_t *parent)| Name | Type | Description |
|---|---|---|
parent | lv_obj_t * | pointer to a parent widget May be NULL.. When NULL, the widget is created as a screen on the default display. |
Returns: lv_obj_t * — pointer to the created arc
lv_arc_bind_value
Bind an integer subject to an Arc's value.
lv_observer_t * lv_arc_bind_value(lv_obj_t *obj, lv_subject_t *subject)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to Arc |
subject | lv_subject_t * | pointer to Subject |
Returns: lv_observer_t * — pointer to newly-created Observer
lv_arc_align_obj_to_angle
Align an object to the current position of the arc (knob)
void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
obj_to_align | lv_obj_t * | pointer to an object to align |
r_offset | int32_t | consider the radius larger with this value (< 0: for smaller radius) |
lv_arc_rotate_obj_to_angle
Rotate an object to the current position of the arc (knob)
void lv_arc_rotate_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_rotate, int32_t r_offset)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an arc object |
obj_to_rotate | lv_obj_t * | pointer to an object to rotate |
r_offset | int32_t | consider the radius larger with this value (< 0: for smaller radius) |
Enums
lv_arc_mode_t
In which direction the indicator should grow.
| Name | Description |
|---|---|
LV_ARC_MODE_NORMAL | Clock-wise |
LV_ARC_MODE_SYMMETRICAL | Left/right from the midpoint |
LV_ARC_MODE_REVERSE | Counterclock-wise |
Used by 1 function
lv_arc_set_mode— paramtype
_lv_property_arc_id_t
| Name | Value |
|---|---|
LV_PROPERTY_ARC_START_ANGLE | (LV_PROPERTY_ARC_START + ((int) 0 )) | (( 2 ) << 28 ) |
LV_PROPERTY_ARC_END_ANGLE | (LV_PROPERTY_ARC_START + ((int) 1 )) | (( 2 ) << 28 ) |
LV_PROPERTY_ARC_BG_START_ANGLE | (LV_PROPERTY_ARC_START + ((int) 2 )) | (( 2 ) << 28 ) |
LV_PROPERTY_ARC_BG_END_ANGLE | (LV_PROPERTY_ARC_START + ((int) 3 )) | (( 2 ) << 28 ) |
LV_PROPERTY_ARC_ROTATION | (LV_PROPERTY_ARC_START + ((int) 4 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_MODE | (LV_PROPERTY_ARC_START + ((int) 5 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_VALUE | (LV_PROPERTY_ARC_START + ((int) 6 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_MIN_VALUE | (LV_PROPERTY_ARC_START + ((int) 7 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_MAX_VALUE | (LV_PROPERTY_ARC_START + ((int) 8 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_CHANGE_RATE | (LV_PROPERTY_ARC_START + ((int) 9 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_KNOB_OFFSET | (LV_PROPERTY_ARC_START + ((int) 10 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ARC_END |
Variables
lv_arc_class
const lv_obj_class_t lv_arc_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_display.hlv_draw.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_image.hlv_draw_label.hlv_draw_line.hlv_draw_rect.hlv_draw_triangle.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_group.hlv_image_decoder.hlv_image_dsc.hlv_indev.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj_class.hlv_obj_draw.hlv_obj_event.hlv_obj_pos.hlv_obj_property.hlv_obj_scroll.hlv_obj_style.hlv_obj_style_gen.hlv_obj_tree.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_symbol_def.hlv_text.hlv_timer.hlv_types.h
Last updated on