lv_draw_arc.h
Functions
-
void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t *dsc)
Initialize an arc draw descriptor.
- Parameters:
dsc – pointer to a draw descriptor
-
lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task)
Try to get an arc 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_ARC
-
void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc)
Create an arc draw task.
- Parameters:
layer – pointer to a layer
dsc – pointer to an initialized draw descriptor variable
-
void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area)
Get an area the should be invalidated when the arcs angle changed between start_angle and end_ange
- Parameters:
x – the x coordinate of the center of the arc
y – the y coordinate of the center of the arc
radius – the radius of the arc
start_angle – the start angle of the arc (0 deg on the bottom, 90 deg on the right)
end_angle – the end angle of the arc
w – width of the arc
rounded – true: the arc is rounded
area – store the area to invalidate here
-
struct lv_draw_arc_dsc_t
Public Members
-
lv_draw_dsc_base_t base
-
lv_color_t color
The color of the arc
-
int32_t width
The width (thickness) of the arc
-
lv_value_precise_t start_angle
The start angle in 1 degree units (if
LV_USE_FLOAT
is enabled a float number can be also used) 0° is the 3 o'clock position, 90° is the 6 o'clock, etc.
-
lv_value_precise_t end_angle
The end angle, similarly to start_angle.
-
lv_point_t center
The center point of the arc.
-
uint16_t radius
The outer radius of the arc
-
const void *img_src
An image source to be used instead of
color
.NULL
if unused
-
lv_opa_t opa
Opacity of the arc in 0...255 range. LV_OPA_TRANSP, LV_OPA_10, LV_OPA_20, .. LV_OPA_COVER can be used as well
-
uint8_t rounded
1: Make the arc ends rounded
-
lv_draw_dsc_base_t base