lvgl.arc
Display an arc.
Syntax
lvgl.arc([parent], {settings})
parent:arc({settings})
Parameters
See the API page for parameter description and common settings.
Note: 'w', 'h' and 'size' should not be used with lvgl.arc. Use 'radius' instead.
Arc specific settings:
thickness
Number
Sets the width of the line used to draw the arc.
1
radius
Number or Function
Sets the radius of the arc
0
startAngle
Number or Function
Sets the starting angle or the arc. Measured in degrees - 0 - 360. 0 is to the right (3 o'clock).
0
endAngle
Number or Function
Sets the ending angle for the arc.
360
opacity
Number or Function
Sets the opacity. Note: range is 0 (transparent) to 255 (opaque).
255 (opaque)
rounded
Boolean
If true makes the ends of the arc round.
false
bgColor
Color or Function
Sets the color of the background arc.
not used
bgOpacity
Number or Function
Sets the opacity of the background arc.
0 (not visible)
bgStartAngle
Number or Function
Sets the starting angle or the background arc. Measured in degrees - 0 - 360. 0 is to the right (3 o'clock).
0
bgEndAngle
Number or Function
Sets the ending angle for the arc.
360
Notes:
Arcs object have two elements a foreground arc and a background arc. By default the background arc is not shown. To show the background arc set both the bgColor and bgOpacity properties.
If opacity or bgOpacity is less than 255 (fully opaque) and rounded is set to true, the ends of the arc will not draw correctly. This is an Lvgl limitation.
Example:
Return values
LVGL object
API Status
BW radios
Color radios
Change log
2.11.0
Introduced
Last updated
Was this helpful?