emWin is a graphics package ideally suited for resource-constrained systems requiring high quality output. Its capabilities cover everything from basic text display to sophisticated animations.
This are a couple of reasons, why emWin is leading in the market place of graphic packages for embedded systems:
- Support for any IDE and toolchain
- Any microcontroller is supported
- Free version for popular hardware platforms available
- No RTOS required
- Flexible memory interface, graphics and fonts can be stored in any memory space
- Small footprint, made for single chip solutions
- VNC Support
- Source Code available
- Pre-defined standard skins
- All standard graphics supported (BMP, GIF, PNG, JPEG)
- Any display controller is supported
- Frame buffer can be managed by microcontroller and display controller
- Window Manager available
emWin Language Support
Writing text in emWin is based on UTF-8 encoding. UTF-8 defines a multi-octet character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. UTF-8 has the characteristic of preserving the full ASCII range, providing compatibility with file systems, parsers and other software that rely on ASCII values but are transparent to other values. emWin supports drawing of all characters of the "Basic Multilingual Plane" (BMP, plane 0) which covers the code points from 0x0000 to 0xFFFF. This BMP contains characters for almost all modern languages, and a large number of special characters.
Right to left- and bidirectional text
Whereas most scripts are written from the left to the right (LTR), there are some scripts like Hebrew and Arabic which are written from the right to the left (RTL). Bidirectional (BIDI) text contains text with both directionalities which is supported by emWin. The Unicode consortium has defined the rules for combining RTL- and LTR text in the Unicode standard. It prescribes an algorithm for how to convert the logical sequence of characters into the correct visual presentation observing a set of rules. emWin fol- lows up these rules to get the right visual order before drawing the text. It observes the rules of the bidirectional text algorithm of the Unicode standard.
Language resource file
emWin supports use of text- and language resource files to change the text of an application without modifying any line of code. That can be achieved by using a CSV (Comma Separated Value) file or several text files, one for each language. These files can reside in addressable RAM or at any non addressable medium like NAND flash or a file system.
emWin supports different emWin specific types of fonts. It covers antialiasing, drawing of compound characters like required in Thai language. These fonts can be located everywhere, in ROM, RAM or any external non addressable media.
The functionality of emWin can be enhanced by making use of TrueType fonts. True- Type is an outline font standard developed by Apple Computer. It offers font developers a high degree of control over how their fonts are displayed at various font heights.
Contrary to bitmap fonts which are based on bitmaps for each character, TrueType fonts are based on vector graphics. The advantage of the vector representation is the loss-free scalability. TTF support can be achieved by using the FreeType font library from David Turner, Robert Wilhelm and Werner Lemberg which is not part of emWin.
emWin supports a wide range of image formats, including several emWin specific formats as well as BMP, JPEG, GIF and PNG files.
The recommended and most efficient way to display a bitmap known at compile time is to use one of the emWin specific formats. If the application needs to display images not known at compile time, the image needs to be available in a graphic file format supported by emWin.
In this case, the image file can reside in memory or any other storage device; it can be displayed even if the amount of available memory is less than the size of the image file. emWin supports BMP, JPEG, GIF files. PNG file support can be achieved by adding the PNG library available on our website.
emWin Multiple Layers / Multiple Displays
A lot of modern LCD controllers offer the ability to use multiple layers. In emWin each layer could be used with its own color depth, size and position. Every single layer could use its own display driver. That makes it possible to use multiple displays simultaneously, or multiple layers AND multiple displays.
Requirements / Restrictions
- LCD controller with multiple layers OR
- A hardware with multiple displays
In general Multi-Buffering is a method which is able to avoid several unwanted effects:
- The visible process of drawing a screen item by item
- Flickering effects caused by overlapping drawing operations
- Tearing effects caused by writing operations outside the vertical blanking period
Multiple Buffering is a method of using more than one frame buffer. Basically it works as follows: With multiple buffers enabled there is a front buffer which is used by the display controller to generate the picture on the screen and one or more back buffers which are used for the drawing operations. After completing the drawing operations the back buffer becomes the visible front buffer.
Requirements / Restrictions
- Direct addressable frame buffer.
- Enough video RAM for multiple frame buffers should be available.
- If tearing effects should be avoided it should be possible to react on the VSYNC signal of the display controller.
Compiles and executes the application code on the windows host system.
The simulation makes it possible to run emWin on the host PC and shows exactly the same display content as visible on the target screen.
This allows you to:
- Design the user interface on your PC.
- Debug the user interface on your PC.
- Creation of demos of your application, which can be used to discuss the user interface.
It allows you to show each layer in its own window and/or a composite view, which represents the content of the display.
- Microsoft Visual Studio or Codeblocks/MinGW
Bringing up motion into an application could be done by several ways. If a fixed sequence of pictures does not work and one or more objects should change their properties like position, color, shape, size or whatever within a given period of time, emWin offers an animation object for exactly that purpose.
It is able to animate multiple animation items during the timeline of an animation. Animation item means a custom defined routine which receives a position value from the animation object. That value is calculated in dependence of the current point in time. The calculation could be done by predefined or custom defined methods.
A "Sprite" is an image which can be shown above all other graphics on the screen. A sprite preserves the screen area it covers. It can be moved or removed at any time, fully restoring the screen content. Animation by use of multiple images is possible.
Sprites are completely independent from all other drawing operations as well as window operations: Sprites do not affect drawing or window operations; drawing or window operations do not affect Sprites.
In short: Sprites can be seen as objects which are sitting "on top" of the screen.
emWin comes with its specific (E)mWin (M)ovie (F)ile format (EMF).
- Only one frame is required in memory.
- No new decompression algorithms are required.
- No license fees required
emWin comes with a converter based on FFMpeg based on the open source tool FFmpeg which is available under www.ffmpeg.org. It is free software licensed under the LGPL or GPL. It is able to con- vert files of nearly any movie file source format into any desired destination format, also into single JPEG files. The converter is quite easy to use: Simply drop any video file on the converter link.