Skip to content

lcd.drawFilledCircle

since 1.1.0

Draw a filled circle.

lcd.drawFilledCircle(x, y, r)

Parameters

Name Type Required Description
x number yes X coordinate of the center of the circle
y number yes Y coordinate of the center of the circle
r number yes circle radius

Returns

Nothing.

Examples

-- status LED: green when telemetry is live, red otherwise
local ON, OFF = lcd.RGB(40, 200, 60), lcd.RGB(200, 40, 40)

local function drawLed(x, y, r, on)
  lcd.color(on and ON or OFF)
  lcd.drawFilledCircle(x, y, r)
end

Real-world usage

Called 54 times across 6 open-source Ethos Lua projects. A few short excerpts:
lcd.drawFilledCircle(startX + (i - 1) * spacing, yPos, dotRadius)

src/dashx/widgets/dashboard/lib/loaders.lua:125

lcd.color(pointColor)
lcd.drawFilledCircle(p.x, p.y, r)

src/wfsuite/app/curves_visual.lua:102

if lcd.drawFilledCircle then
    lcd.drawFilledCircle(cx, cy, radius)

src/ofs3/widgets/dashboard/lib/loaders.lua:99