Skip to content

lvgl.triangle

Syntax

lvgl.triangle([parent], {settings})

parent:triangle({settings})

Parameters

See the API page for parameter description and common settings.

The 'x, 'y, 'w' and 'h' settings are not used.

Triangle specific settings:

NameTypeDescriptionDefault if not set
opacityNumber or FunctionSets the opacity.
Note: range is 0 (transparent) to 255 (opaque)
255 (opaque)
pts

Table or Function

Table of points. Each point must be a table with two number values ({x, y})

Defines the points used to draw the triangle. There must be three points.nil

Return values

LVGL object

Notes

Unlike the line drawing objects, there is no built in triangle drawing in LVGL. The method used to draw triangles is quite simple and does not do any anti-aliasing.

API Status

AvailStatusComment
BW radiosfalse
Color radiostrueactive

Change log

EdgeTX versionChange
2.11.0Introduced