Skip to content

lcd.pen

since 1.1.0

Get / Set the current pen style.

local pen = lcd.pen(pen)

Parameters

Name Type Required Description
pen integer yes a binary mask or one of the values SOLID, DOTTED or DASHED

Returns

pen (integer)

Examples

lcd.pen(PEN_DOTTED)
lcd.drawLine(0, thresholdY, w, thresholdY)   -- dotted threshold line
lcd.pen(PEN_SOLID)                            -- back to solid for the rest

Real-world usage

Called 15 times across 5 open-source Ethos Lua projects. A few short excerpts:
lcd.pen(PEN_DOTTED)

src/ofs3/tools/logs.lua:1144

lcd.color(color or COLOR_GREY)
lcd.pen(pen or SOLID)

src/rfsuite/app/pages/logs.lua:222