lv_draw_line.h¶
Defines
-
LV_DRAW_LINE_POINT_NONE¶
Functions
-
void lv_draw_line_dsc_init(lv_draw_line_dsc_t *dsc)¶
Initialize a line draw descriptor
- Parameters:
dsc – pointer to a draw descriptor
-
lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task)¶
Try to get a line draw descriptor from a draw task.
- Parameters:
task – draw task
- Returns:
the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_LINE
-
void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc)¶
Create a line draw task
- Parameters:
layer – pointer to a layer
dsc – pointer to an initialized
lv_draw_line_dsc_tvariable
-
void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc))¶
A helper function to call a callback which draws a line between two points. This way it doesn't matter if
p1, p2orpointswere used as it calls thecallbackas needed.- Parameters:
t – draw task
dsc – pointer to a draw descriptor
draw_line_cb – a callback that draws a line between
dsc->p1anddsc->p2
-
struct lv_draw_line_dsc_t¶
Public Members
-
lv_draw_dsc_base_t base¶
-
lv_point_precise_t p1¶
The first point of the line. If
LV_USE_FLOATis enabled float number can be also used. Ignored ifpointsare set
-
lv_point_precise_t p2¶
The second point of the line. If
LV_USE_FLOATis enabled float number can be also used Ignored ifpointsare set
-
lv_point_precise_t *points¶
Array of points to draw. If
LV_USE_FLOATis enabled, float numbers can also be used.
-
int32_t point_cnt¶
Number of points in the
points
-
lv_color_t color¶
The color of the line
-
int32_t width¶
The width (thickness) of the line
-
int32_t dash_width¶
The length of a dash (0: don't dash)
-
int32_t dash_gap¶
The length of the gaps between dashes (0: don't dash)
-
lv_opa_t opa¶
Opacity of the line in 0...255 range. LV_OPA_TRANSP, LV_OPA_10, LV_OPA_20, .. LV_OPA_COVER can be used as well
-
uint8_t round_start¶
Make the line start rounded
-
uint8_t round_end¶
Make the line end rounded
-
uint8_t raw_end¶
1: Do not bother with line ending (if it's not visible for any reason)
-
lv_draw_dsc_base_t base¶