Several display layers are available.
You can hide or show any layer. You can even laterally move these layers which are slightly larger
than the displayable surface (128x128), generating thus a scrolling effect. You can take advantage of
this layer system to implement a
double buffering
1
system.
Each layer has its own graphical context: cursor position, current font, current color, etc... This
means that you must set these parameters for each layer with which you work. But this also means
that several distinct processes can interact with your Yocto-Display without risking conflict issues:
they only need to write in different layers.
Primitives working directly on display layers include:
• clear
• hide
• unhide
• setLayerPosition
• reset
• swapLayerContent
• copyLayerContent
3.4. Graphic routines
Your Yocto-Display contains basic graphic routines: lines, rectangles, circles, discs, text display, etc.
All these routines support clipping: you can write on top of a layer border, the part located in the zone
managed is taken into account, the outside part is ignored.
For more complex graphical operations, or simply if you feel more comfortable with it, you can also
use your favorite graphic library running on the host driving the Yocto-Display to build a bitmap in
memory, then render it with a single command on the layer of your choice. The Yoctopuce API is fast
enough to make this possible even to make real-time animations.
Basic graphic primitives are:
• moveTo
• lineTo
• drawPixel
• drawRect
• drawBar
• drawCircle
• drawDisc
• drawBitmap
• drawImage
Colors
The Yocto-Display screen is purely monochrome. You cannot, therefore, display grey levels, nor
benefit from anti-aliasing. You can draw using three "colors": the screen display color (which we will
1
http://en.wikipedia.org/wiki/Multiple_buffering
3. Working principles
8
www.yoctopuce.com
Содержание 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...