Storyboard Resource Export Configuration Editor

The Storyboard Resource Export Configuration editor provides the ability to create configurations for how resources should be exported from Designer. This allows for fine grained control over how and when resources should be exported from the design environment.

resource_export_configuration_editor.png

Managing Configurations

The Resource Export Configuration editor allows for the creation, deletion, and resetting of a configuration. The following toolbar controls these operations.

resource_export_configuration_manage.png

The combo box allows for the selection of a configration.

The add button will invoke a dialog that allows for the creation of a new configuration. The following dialog is invoked

resource_export_configuration_manage.png

A name needs to be entered for the new configuration. The name must be unique. You can select a base configuration to base the new configuration off of. This will make a copy of the options that have been applied to the resources in the base configuration and apply them in the new configuration. When finished click on the "OK" button to create the new configuration or the "Cancel" button to abort the creation of the new configuration.

The delete button will remove the currently selected configuration. Note that the default configuration cannot be deleted.

The revert button will reset all of the options on the resources to their default values.

Resource Tree

The resource tree allows for the selection of individual resources so that options can be changed on individual resources.

resource_export_configuration_tree.png

The filter allows for the searching of resources based on name.

The tree is grouped by each of the different resource types, images, fonts, scripts, and other. There is a right-click menu that can be invoked that will allow for the creation, deletaion, and reverting of the current configuration. It also allows for the generation of image maps if the image map option is selected. References to currently selected resource can also be searched for in the model.

The "Add Resource" button at the button of the tree allows for the addition of resources that are not in the images, fonts or scripts directories. The "Add Font" button allows for the addition of a font that is shipped by Designer. If the storage type for the configuration is "VFS" and the font export format is "Bitmap" the a size can also be selected for the font.

Resource Export Options

Resource options are set at a global level and at an individual level. All resources will use the global setting for an option if the option is not changed at the individual level. This allows for a quick setting of options for the general case of how a resource should be exported but then also allows for more granular control over individual resources that need to be exportted in a different way. For example, most images in an application may have alpha. So in an VFS configuration, most images should probably be exportted as the "DIRECT RGB8888" format. However for a big background image, that has no alpha, it may make sense to export that image as the "DIRECT RGB565" format as this will save on space.

resource_export_configuration_editor_options.png

There are two options that are applied to the configuration. There is the name and the storage type. The name must be unique and the "Default" configuration cannot be renamed. The options for the storage type are: All of the global options are mirrors of the individual options that can be set on an individual resource. There are global options and individual resources for images, fonts and scripts.

Filesystem

This will export resources to a filesystem. This selection disables the need for a majority of the options on the resources as they will be loaded and intepretted from the filesystem based on the type of resource they are the exception to this rule is script files. They can be exported as compiled scripts to a filesystem.

Virtual Filesystem

This will export resources in a virtual filesystem format. This selection is only available for use with the C Header exporter. This enables a majority of the option as the C Header export is used with systems that have constrained resources.

When the VFS format is selected as the storage type, the "Font Export Format" option is enabled for the configuration. This is a global option as the mxing of bitmap and truetype font configurations is not currently supported. The choices for the "Font Export Format" are:

TTF

This will export all fonts as a ttf file. This file will require the TrueType font manager to be used. Each ttf file that is needed will be loaded in to memory and the glyphs that are used will be stored in a cache in the heap.

Bitmap

This will export each individual glyph in a font file as an alpha map. The size of each individual pixel in the alpha map can be controlled through the "Font Bitmap Depth" option.

When the "Font Export Format" is set to the "Bitmap" option then the "Font Bitmap Depth" option will be enabled. This option is something that can be controlled on each individual font size resource as larger sizes may take up more space. The choices for the "Font Bitmap Depth" option are:

1 Bit

This will export the bitmap font as an alphamap that has 1 bit per pixel in the alphamap. This bit determines if a pixel should be on or off.

2 Bits

This will export the bitmap font as an alphamap that has 2 bits per pixel in the alphamap. These 2 bits represent the alpha value that should be used for that pixel

4 Bits

This will export the bitmap font as an alphamap that has 4 bits per pixel in the alphamap. These 4 bits represent the alpha value that should be used for that pixel

8 Bits

This will export the bitmap font as an alphamap that has 8 bits per pixel in the alphamap. These 8 bits represent the alpha value that should be used for that pixel

If the "Font Export Format" is set to the "Bitmap" option then the "Font Glyph Map Width" option will be enabled. This option is an option that can be set on each individual font size. It controls how wide a glyph map width can be. It is useful if a system has alignment restrictions when rendering buffers. The "Max Glyph Width" checkbox will set the "Glyph Map Width" to the width of the largest glyph in the font. This creates a single strip of glyphs in the glyph map.

The "Image Export Format" option will become enabled when the "VFS" option is specified as the "Storage Type". The available image export formats are:

Native Format

This will export the image in its native format, such as a PNG or JPEG. This will require the image to be decoded at runtime which will require heap.

Direct RGB8888

This will export the image as an uncompressed image that has 32 bits per pixel. This image can then be drawn directly from storage without the need for heap.

Direct RLE RGB8888

This will export the image as run length encoded image that has 32 bits per pixel. This image can then be drawn directly from storage without the need for heap, but will require the pixels to be expanded as it is being draw, which may incur a perforamance hit. It will in most cases take up less space.

Direct RGB565

This will export the image as an uncompressed image that has 16 bits per pixels. This image can then be drawn directly from storage without the need for heap. The image will take up less space than the DIRECT RGB8888, but it will not support alpha. Also gradients may show banding due to a reduction in color fidelity.

Direct RGB565 Dithered

This will export the image as an uncompressed image that has 16 bits per pixels that has been dithered. This image can then be drawn directly from storage without the need for heap. The image will take up less space than the DIRECT RGB8888, but it will not support alpha. Gradients should not have banding due to the dithering.

Direct Indexed

This will export the image as an uncompressed image that is palette based. This image can then be drawn directly from storage without the need for heap. The image will take up less space than the DIRECT RGB8888. Colors may look different because they will be matched to colors in the palette.

Direct RLE Indexed

This will export the image as an run length encoded image that is palette based. This image can then be drawn directly from storage without the need for heap, but will require the pixels to be expanded as it is being draw, which may incur a perforamance hit. It will in most cases take up less space.

The "Image Start Alignment" option will become enabled when the "VFS" option is specified as the "Storage Type". The value that is specified for this option is the alignment that is used for the image data in any of the direct rendering image format options. The "Image Map Width" option will become enabled when the "VFS" option is specified as the "Storage Type". This is an option that can be set individually on image maps. This will set the width that the image map will use. The height of the image map will be set to whatever is required to fit all images in the image map.

The "Script Export Format" option controls how lua scripts are export. The options are:

Raw

This will export the script file as plain text. It will need to be compiled by the Lua engine when it is loaded.

Bitmap

This will precompile the Lua file when it is exported, so that the Lua engine does not need to do it at runtime.

Additionally each resource has an "Include in Export" option. If this option is unchecked, the resource will be omitted from the export.

Application Footprint Preview

This preview provides feedback on how much memory or storage an resource export configuration will take up when it is used. For more information, see the Metrics view topic.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.