
22. High-level API Reference
298
www.yoctopuce.com
YDisplayLayer
displaylayer
→
drawBitmap()
Draws a bitmap at the specified position.
js
function drawBitmap(
x
,
y
,
w
,
bitmap
,
bgcol
)
cpp
int drawBitmap( int
x
, int
y
, int
w
, string
bitmap
, int
bgcol
)
m
-(int) drawBitmap : (int)
x
: (int)
y
: (int)
w
: (NSData*)
bitmap
: (int)
bgcol
pas
function drawBitmap(
x
: LongInt,
y
: LongInt,
w
: LongInt,
bitmap
: TByteArray,
bgcol
: LongInt): LongInt
vb
procedure drawBitmap( )
cs
int drawBitmap( int
x
, int
y
, int
w
, int
bgcol
)
java
int drawBitmap( int
x
, int
y
, int
w
, byte[]
bitmap
, int
bgcol
)
uwp
Task<int> drawBitmap( int
x
,
int
y
,
int
w
,
int
bgcol
)
py
def drawBitmap(
x
,
y
,
w
,
bitmap
,
bgcol
)
php
function drawBitmap(
$x
,
$y
,
$w
,
$bitmap
,
$bgcol
)
es
function drawBitmap(
x
,
y
,
w
,
bitmap
,
bgcol
)
cmd
YDisplay
target
[-layer
layerId
] drawBitmap
x
y
w
bitmap
bgcol
The bitmap is provided as a binary object, where each pixel maps to a bit, from left to right and from top
to bottom. The most significant bit of each byte maps to the leftmost pixel, and the least significant bit
maps to the rightmost pixel. Bits set to 1 are drawn using the layer selected pen color. Bits set to 0 are
drawn using the specified background gray level, unless -1 is specified, in which case they are not
drawn at all (as if transparent).
Parameters :
x
the distance from left of layer to the left of the bitmap, in pixels
y
the distance from top of layer to the top of the bitmap, in pixels
w
the width of the bitmap, in pixels
bitmap
a binary object
bgcol
the background gray level to use for zero bits (0 = black, 255 = white), or -1 to leave the pixels
unchanged
Returns :
YAPI_SUCCESS
if the call succeeds.
On failure, throws an exception or returns a negative error code.
Содержание Yocto-Display
Страница 1: ...Yocto Display User Manual...
Страница 2: ......
Страница 40: ...34 www yoctopuce com...
Страница 52: ...46 www yoctopuce com...
Страница 84: ...78 www yoctopuce com...
Страница 92: ...86 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...
Страница 422: ...416 www yoctopuce com...
Страница 424: ...24 Characteristics 418 www yoctopuce com...