Skip to content

lcd.drawBitmap

lcd.drawBitmap(bitmap, x, y [, scale])

Displays a bitmap at (x,y)

Parameters

Name Req Type Description
bitmap yes pointer point to a bitmap previously opened with Bitmap.open()
x yes integer starting coordinates
y yes integer starting coordinates
scale no integer scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale.

Returns

None.

Availability

  • Since: 2.2.0
  • Radio support: color-lcd

Notes

  • Only available on radios with color display

Source

radio/src/lua/api_colorlcd.cpp

Extended Description

lcd.drawBitmap is a good example of the split between generated API truth and richer authored guidance. The syntax, parameter list, and availability belong in upstream source annotations. Practical usage notes and examples can stay here in an overlay file.

Examples

local bmp = Bitmap.open("/IMAGES/logo.png")
if bmp then
  lcd.drawBitmap(bmp, 10, 12, 100)
end
  • Bitmap.open
  • Bitmap.getSize