lcd.setClipping¶
since 1.1.0
Set the clipping rect.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
x |
number | yes | X coordinate |
y |
number | yes | Y coordinate |
w |
number | yes | rectangle width |
h |
number | yes | rectangle height |
Returns¶
width (integer): window with
Examples¶
-- draw a striped fill that must not spill past the filled width
lcd.setClipping(barX, barY, fillW, barH)
lcd.drawBitmap(barX, barY, STRIPES)
lcd.setClipping() -- reset
-- or: lcd.setClipping(0, 0, lcd.getWindowSize())
Used in¶
Real-world usage¶
Called 32 times across 5 open-source Ethos Lua projects. A few short excerpts: