
call "white" in this documentation even if it might be light blue for example), black, or transparent
(eraser).When you write using the transparent color, the layer below becomes visible. Note that layer
0 is not transparent. Writing in transparent color on this layer is equivalent to writing in black. This is
important when you switch the content of two layers.
Primitives allowing you to change the color of a drawing are:
• selectGrayPen
• selectEraser
3.5. Text display
You can display any text at an arbitrary location of the screen. The Yocto-Display contains some
embedded fonts, but you can create your own relatively easily. It is not possible to know beforehand
the size of a text, but to compensate this, numerous text alignment modes are available. You can
align text left, right, and center, from the decimal point, the base line, etc.
The alignment options
Primitives allowing you to display text are:
• selectFont
• drawText
Fonts built-in into the device firmware are:
•
Small.yfm
(height: 8 pixels)
•
Medium.yfm
(height: 16 pixels)
•
Large.yfm
(height: 32 pixels)
•
8x8.yfm
(monospaced)
Console mode
There is another method to display text on your Yocto-Display: the console mode. The console is a
rectangular area of which you can parameterize the position. Texts displayed in this console are
displayed like in a terminal, and line feeds are automatically generated. By default, the console size
of each layer is initialized to the size of the screen.
Primitives allowing you to manage the console are:
• clearConsole
• consoleOut
• setConsoleMargins
• setConsoleBackground
• setConsoleWordWrap
Internationalization and regional characters
The text display functions can render international characters for languages that meet the following
criteria:
• 8-bit character set
3. Working principles
www.yoctopuce.com
9
Содержание 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...