lcd.drawMask¶
since 1.1.0
Draw a mask.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
x |
number | yes | X coordinate |
y |
number | yes | Y coordinate |
mask |
Mask | yes | mask |
Returns¶
Nothing.
Examples¶
local ARROW = lcd.loadMask("gfx/arrow.png") -- file level
local function paint(widget)
lcd.color(lcd.RGB(255, 200, 0)) -- the mask is painted in the current color
lcd.drawMask(10, 10, ARROW)
end
Masks are single-channel images, cheaper than full-color bitmaps and recolorable, so they suit icons that should follow the theme or signal state with color.
Used in¶
Real-world usage¶
Called 2 times across 2 open-source Ethos Lua projects. A few short excerpts: