Skip to content

lvgl.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:

NameTypeDescriptionDefault if not set
thicknessNumberSets the width of the line used to draw the arc.1
radiusNumber or FunctionSets the radius of the arc0
startAngleNumber or FunctionSets the starting angle or the arc. Measured in degrees - 0 - 360.
0 is to the right (3 o'clock).
0
endAngleNumber or FunctionSets the ending angle for the arc.360
opacityNumber or FunctionSets the opacity.
Note: range is 0 (transparent) to 255 (opaque).
255 (opaque)
roundedBooleanIf true makes the ends of the arc round.false
bgColorColor or FunctionSets the color of the background arc.not used
bgOpacityNumber or FunctionSets the opacity of the background arc.0 (not visible)
bgStartAngleNumber or FunctionSets the starting angle or the background arc. Measured in degrees - 0 - 360.
0 is to the right (3 o'clock).
0
bgEndAngleNumber or FunctionSets 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:

lvgl.arc({radius=30, thickness=8, startAngle=155, endAngle=25,
          bgStartAngle=120, bgEndAngle=60, bgColor=GREY, bgOpacity=255,
          color=RED, rounded=true})

Return values

LVGL object

API Status

AvailStatusComment
BW radiosfalse
Color radiostrueactive

Change log

EdgeTX versionChange
2.11.0Introduced