lv_draw_arc.h

API reference for lv_draw_arc.h

Report on GitHub

Functions

lv_draw_task_get_arc_dsc

Try to get an arc draw descriptor from a draw task.

 
lv_draw_arc_dsc_t * lv_draw_task_get_arc_dsc(lv_draw_task_t *task)
Parameters
NameTypeDescription
tasklv_draw_task_t *draw task

Returns: lv_draw_arc_dsc_t * — the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_ARC

lv_draw_arc_get_area

Get an area the should be invalidated when the arcs angle changed between start_angle and end_ange

 
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)
Parameters
NameTypeDescription
xint32_tthe x coordinate of the center of the arc
yint32_tthe y coordinate of the center of the arc
radiusuint16_tthe radius of the arc
start_anglelv_value_precise_tthe start angle of the arc (0 deg on the bottom, 90 deg on the right)
end_anglelv_value_precise_tthe end angle of the arc
wint32_twidth of the arc
roundedbooltrue: the arc is rounded
arealv_area_t *store the area to invalidate here

Structs

struct

lv_draw_arc_dsc_t

MemberTypeDescription
baselv_draw_dsc_base_t
colorlv_color_tThe color of the arc
widthint32_tThe width (thickness) of the arc
start_anglelv_value_precise_tThe 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.
end_anglelv_value_precise_tThe end angle, similarly to start_angle.
centerlv_point_tThe center point of the arc.
img_srcconst void *An image source to be used instead of color. NULL if unused
radiusuint16_tThe outer radius of the arc
opalv_opa_tOpacity of the arc in 0...255 range. LV_OPA_TRANSP, LV_OPA_10, LV_OPA_20, .. LV_OPA_COVER can be used as well
roundeduint8_t1: Make the arc ends rounded
Used by 10 functions
  • lv_obj_init_draw_arc_dsc — param draw_dsc
  • lv_draw_eve_arc — param dsc
  • lv_draw_arc_dsc_init — param dsc
  • lv_draw_arc — param dsc
  • lv_draw_nanovg_arc — param dsc
  • lv_draw_nema_gfx_arc — param dsc
  • lv_draw_dave2d_arc — param dsc
  • lv_draw_sdl_arc — param dsc
  • lv_draw_sw_arc — param dsc
  • lv_draw_vg_lite_arc — param dsc

Dependencies

How is this guide?

Last updated on

On this page