Working with Embedded Wizard: Managing resources and assets

In practice, every GUI application requires image and font data to be displayed at the runtime on the screen. This chapter introduces the corresponding concepts of resources and constants.

Bitmap resources

Images (or image assets) are represented in Embedded Wizard by bitmap resource project members. In practice, for every image you intend to use within your GUI application you have to add and configure one bitmap resource member. In a more sophisticated case you can manage with a single bitmap resource several image frames which at runtime can be selected conveniently by using an index or, similarly to a short video sequence, can be played back. Moreover, bitmap resource members can be localized for usage in a multi-lingual application.

How bitmap resources are added, configured and localized is described in the chapter Bitmap resource. Generally, with the bitmap resource member you simply refer to an original PNG, JPG, GIF, BMP, ... file. At the code generation time, the affected file is evaluated and converted for your particular target system in the best possible manner. This includes color reduction, dithering and compression.

To display the bitmap on the screen the Mosaic framework provides various views.

Extern Bitmap contents

With the above mentioned bitmap resources you define a static set of graphics to use in your application. In order to load image contents dynamically at the runtime (e.g. files found on a SD card) the Mosaic framework provides a simple interface you can implement to integrate your application with an external image decoder..

Once the interface is implemented, you use Extern Bitmap objects similarly as you do with ordinary bitmap resources. In particular you can assign an Extern Bitmap object to a view and thus display the image.

Font resources

Fonts are represented in Embedded Wizard by font resource project members. In practice, for every font you intend to use within your GUI application you have to add and configure a font resource member. In a more sophisticated case, you can combine with a single font resource member several real fonts to one big virtual font. The font resource member determines all attributes of the used font like its height, style, weight and specifies which font glyphs (signs) are important for your application. Knowing this, Embedded Wizard can optimize and compress the font information in the best possible manner for your target system.

How font resources are added and configured is described in the chapter Font resource. Generally, with the font resource member you simply refer to a TrueType font installed on your desktop PC. At the code generation time, the affected TrueType font is evaluated and all glyphs specified in the font resource member are rasterized in small bitmaps ready to use in your target system. In this case no TrueType font engine is required in the target device. However, if your target device contains already a TrueType font engine, we can provide you a Platform Package optimized to rasterize the glyphs directly at the runtime by using the available font engine.

To display the text on the screen the Mosaic framework provides various views.

String constants

Strings (text) can be managed conveniently by using the constant project members. In practice, you can define for every text phrase an individual constant member, which then can be referred within your application wherever this text is needed. The constant members can be easily localized for usage in a multi-lingual application.

How constants are added, configured and localized is described in the chapter Constant. To display the text on the screen the Mosaic framework provides various views.

TIP

Embedded Wizard supports character codes (code points) from UNICODE plane 0.

Other constant data

Similarly to the above described strings, you can use the constant project members to manage within your application any further information. This can for example be color, position or size settings. Even using the constant members permits you to localize this information for multi-lingual applications.