lv_line.h
API reference for lv_line.h
Functions
lv_line_set_points
Set an array of points. The line object will connect these points.
void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
points | const lv_point_precise_t | an array of points. Only the address is saved, so the array needs to be alive while the line exists. May be NULL. Use NULL to remove the previously assigned points of the line |
point_num | uint32_t | number of points in 'point_a' |
lv_line_set_points_mutable
Set a non-const array of points. Identical to lv_line_set_points except the array may be retrieved by lv_line_get_points_mutable.
void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
points | lv_point_precise_t | a non-const array of points. Only the address is saved, so the array needs to be alive while the line exists. May be NULL. Use NULL to remove the previously assigned points of the line |
point_num | uint32_t | number of points in 'point_a' |
lv_line_set_y_invert
Enable (or disable) the y coordinate inversion. If enabled then y will be subtracted from the height of the object, therefore the y = 0 coordinate will be on the bottom.
void lv_line_set_y_invert(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
en | bool | true: enable the y inversion, false:disable the y inversion |
lv_line_get_points
Get the pointer to the array of points.
const lv_point_precise_t * lv_line_get_points(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
Returns: const lv_point_precise_t * — const pointer to the array of points
lv_line_get_point_count
Get the number of points in the array of points.
uint32_t lv_line_get_point_count(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
Returns: uint32_t — number of points in array of points
lv_line_get_points_mutable
Get a pointer to the mutable array of points or NULL if it is not mutable
lv_point_precise_t * lv_line_get_points_mutable(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
Returns: lv_point_precise_t * — pointer to the array of points. NULL if not mutable.
lv_line_get_y_invert
Get the y inversion attribute
bool lv_line_get_y_invert(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a line object |
Returns: bool — true: y inversion is enabled, false: disabled
lv_line_create
Create a line object
lv_obj_t * lv_line_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 line
lv_line_is_point_array_mutable
Check the mutability of the stored point array pointer.
bool lv_line_is_point_array_mutable(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a line object |
Returns: bool — true: the point array pointer is mutable, false: constant
Enums
_lv_property_line_id_t
| Name | Value |
|---|---|
LV_PROPERTY_LINE_Y_INVERT | (LV_PROPERTY_LINE_START + ((int) 0 )) | (( 11 ) << 28 ) |
LV_PROPERTY_LINE_END |
Variables
lv_line_class
const lv_obj_class_t lv_line_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.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_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