22. High-level API Reference
www.yoctopuce.com
317
YDisplayLayer
displaylayer
→
selectGrayPen()
Selects the pen gray level for all subsequent drawing functions, including text drawing.
js
function selectGrayPen(
graylevel
)
cpp
int selectGrayPen( int
graylevel
)
m
-(int) selectGrayPen : (int)
graylevel
pas
function selectGrayPen(
graylevel
: LongInt): LongInt
vb
function selectGrayPen( ) As Integer
cs
int selectGrayPen( int
graylevel
)
java
int selectGrayPen( int
graylevel
)
uwp
Task<int> selectGrayPen( int
graylevel
)
py
def selectGrayPen(
graylevel
)
php
function selectGrayPen(
$graylevel
)
es
function selectGrayPen(
graylevel
)
cmd
YDisplay
target
[-layer
layerId
] selectGrayPen
graylevel
The gray level is provided as a number between 0 (black) and 255 (white, or whichever the lighest color
is). For monochrome displays (without gray levels), any value lower than 128 is rendered as black, and
any value equal or above to 128 is non-black.
Parameters :
graylevel
the desired gray level, from 0 to 255
Returns :
YAPI_SUCCESS
if the call succeeds.
On failure, throws an exception or returns a negative error code.
Summary of Contents for Yocto-Display
Page 1: ...Yocto Display User Manual...
Page 2: ......
Page 40: ...34 www yoctopuce com...
Page 52: ...46 www yoctopuce com...
Page 84: ...78 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 422: ...416 www yoctopuce com...