Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.98 KB

File metadata and controls

58 lines (39 loc) · 1.98 KB

lcd.drawBitmap

Displays prevoiusly loaded bitmap at (x,y) and optionally scales it.

Syntax

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

Parameters

NameReqTypeDescription
bitmaptruebitmapPointerstored in variable pointer to a bitmap previously opened with Bitmap.open
xtrueintegertop coordinate
ytrueintegerleft coordinate
scalefalseinteger (0-100)scale in percent ie. 50 divides size by two, 100 displays bitmap in original size, 200 doubles size.

Returns

none

Notes

{% hint style="info" %} Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale parameter. {% endhint %}

Available on

API status

EdgeTX versionAction
2.3.0Introduced

Examples

{% tabs %} {% tab title="Example 1" %}

-- drawing bitmap stored on sd card root folder with original size
local myLogo = Bitmap.open("/logo.png")
lcd.drawBitmap(myLogo,10,10)

{% endtab %}

{% tab title="Example 2" %}

-- drawing bitmap stored on sd card root folder doubling its size
local myLogo = Bitmap.open("/logo.png")
lcd.drawBitmap(myLogo,10,10,200)

{% endtab %} {% endtabs %}

Related topics