Fonts, Bitmaps, Slices – Matrix Orbital GTT70A User Manual
Page 7

3
Command Summary
Fonts
TrueType Font (.ttf) files can be uploaded to the SD memory card, loaded into a font buffer, and used to
display customizable text. Commands are provided to modify the size, colour, and rendering of the
loaded text. True Type Font files can be copied from your Windows Fonts folder or downloaded online.
Bitmaps
Bitmaps typically display static graphic information, but can also be used to create dynamic touch
regions or animations. Furthermore, a specific transparent colour can be selected via command. Please
note that transparency in the images themselves is not supported; all bitmaps should have no more
than 8 bits per channel and only 3 colour channels. Supported extensions are .bmp, .gif, .jpg, and .png.
9-slices
The 9-Slice file format is a simple text file that describes how to take a bitmap, and slice it into portions
to allow simple and elegant scaling. A simple rounded button example would appear as follows:
Figure 2: 9-Slice File Example
Each line must start with a keyword, followed by parameters. If a line contains an unrecognized
keyword, the line is ignored. Keywords are defined in the Example Keypad Response table.
Table 5: 9-slice Keywords
Keyword Parameters
Description
BITMAP
1
Following the keyword, the bitmap that will be sliced is specified
TOP
1
Specifies how many pixels will be used from the top, for the top slice
BOTTOM
1
Specifies how many pixels will be used from the bottom, for the bottom slice
LEFT
1
Specifies how many pixels will be used from the left, for the left slice
RIGHT
1
Specifies how many pixels will be used from the right, for the right slice
VSCALE
0
If this keyword is present, when the 9-Slice is resized it will stretch the middle left and
middle right slices to fill the space required. Without this keyword present, the tile will
be repeated from the top down to fill the space.
HSCALE
0
If this keyword is present, when the 9-Slice is resized it will stretch the middle top and
middle bottom slices to fill the space required. Without this keyword present, the tile
will be repeated from the left to right to fill the space.
TRANS-R
1
The red component of the colour to make transparent in the 9-Slice
TRANS-G
1
The green component of the colour to make transparent in the 9-Slice
TRANS-B
1
The blue component of the colour to make transparent in the 9-Slice