![Yoctopuce Yocto-Display User Manual Download Page 14](http://html1.mh-extra.com/html/yoctopuce/yocto-display/yocto-display_user-manual_3418946014.webp)
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
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...