22. High-level API Reference
292
www.yoctopuce.com
22.4. DisplayLayer object interface
A DisplayLayer is an image layer containing objects to display (bitmaps, text, etc.). The content is
displayed only when the layer is active on the screen (and not masked by other overlapping layers).
In order to use the functions described here, you should include:
js
<script type='text/javascript' src='yocto_display.js'></script>
cpp
#include "yocto_display.h"
m
#import "yocto_display.h"
pas
uses yocto_display;
vb
yocto_display.vb
cs
yocto_display.cs
java
import com.yoctopuce.YoctoAPI.YDisplay;
uwp
import com.yoctopuce.YoctoAPI.YDisplay;
py
from yocto_display import *
php
require_once('yocto_display.php');
es
in HTML: <script src="../../lib/yocto_display.js"></script>
in node.js: require('yoctolib-es2017/yocto_display.js');
YDisplayLayer
methods
displaylayer
→
clear()
Erases the whole content of the layer (makes it fully transparent).
displaylayer
→
clearConsole()
Blanks the console area within console margins, and resets the console pointer to the upper left corner of the
console.
displaylayer
→
consoleOut(
text
)
Outputs a message in the console area, and advances the console pointer accordingly.
displaylayer
→
drawBar(
x1
,
y1
,
x2
,
y2
)
Draws a filled rectangular bar at a specified position.
displaylayer
→
drawBitmap(
x
,
y
,
w
,
bitmap
,
bgcol
)
Draws a bitmap at the specified position.
displaylayer
→
drawCircle(
x
,
y
,
r
)
Draws an empty circle at a specified position.
displaylayer
→
drawDisc(
x
,
y
,
r
)
Draws a filled disc at a given position.
displaylayer
→
drawImage(
x
,
y
,
imagename
)
Draws a GIF image at the specified position.
displaylayer
→
drawPixel(
x
,
y
)
Draws a single pixel at the specified position.
displaylayer
→
drawRect(
x1
,
y1
,
x2
,
y2
)
Draws an empty rectangle at a specified position.
displaylayer
→
drawText(
x
,
y
,
anchor
,
text
)
Draws a text string at the specified position.
displaylayer
→
get_display()
Gets parent YDisplay.
displaylayer
→
get_displayHeight()
Returns the display height, in pixels.
Содержание 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...