Reference

  1. Resources
    1. loadFont
    2. loadImage
    3. loadAlphaNumImages
  2. Drawables
    1. canvas
    2. drawImage
    3. drawText
    4. drawImagesFromText
  3. Layouts
    1. flowLayout
    2. positionalLayout

Resources

loadFont

Short form:

    <loadFont>{fontFile}</loadFont>
AttributeTypeDescription
nameStringThe name of this font resource. You may omit the font name which will simply import the font into the system using its metadata.
fontFileFile[Required] The font file.

loadImage

AttributeTypeDescription
nameStringThe name of this image resource.
imageFileFile[Required] The image file.

loadAlphaNumImages

AttributeTypeDescription
directoryFile[Required] The directory of the images.
fileNamePatternString[Required] The file name pattern where %n is replaced by the character mapped to the image. 
 
Example: 
 
    <range>0-9</range> 
    <fileNamePattern>image_%n.png</fileNamePattern> 
 
    Will load: 
 
        image_0.png for 0 
        image_1.png for 1 
        image_2.png for 2 
        ... 
        image_9.png for 9 
 
rangesString[Required] 
A range can be a single character or two characters separated by '-'. 
The range a-d is equivalent to a,b,c,d. 
You can specify multiple ranges using comma: a, w-z, 0-9. 
Note: a range is based on the unicode standard order.
namePrefixStringThe name prefix for each images. 
 
Examples: 
 
    <namePrefix>num</namePrefix> 
 
    Resource name mapping using the example above (fileNamePattern): 
 
        num0 --> image_0.png 
        num1 --> image_1.png 
        num2 --> image_2.png 
        ... 
        num9 --> image_9.png 
 

Drawables

canvas

AttributeTypeDescription
sizeString[Required if backgroundImageName is not set] 
The size of the canvas. This will override the background image size. 
(Default: 0x0)
backgroundImageNameStringThe background image resource name. The image size will be the canvas size unless the size is explicitly set.
backgroundColorStringThe background color.
positionString{X},{Y} 
where {X} can be: left, right, center or a math expression 
where {Y} can be: top, bottom, center or a math expression 
 
(Default: 0,0) 
 
See Types and Concepts.
alphaintThe transparency value in %, where 0 is completely transparent and 100 is opaque. 
(Default: 100)
isVisiblebooleanSet this to false to skip rendering this component. 
(Default: true)
drawList<Drawable>Drawables. 
Like: <drawImage> and <drawText>

drawImage

Short form:

    <drawImage>{imageName}</drawImage>
AttributeTypeDescription
imageNameString[Required] The image resource name.
positionString{X},{Y} 
where {X} can be: left, right, center or a math expression 
where {Y} can be: top, bottom, center or a math expression 
 
(Default: 0,0) 
 
See Types and Concepts.
alphaintThe transparency value in %, where 0 is completely transparent and 100 is opaque. 
(Default: 100)
isVisiblebooleanSet this to false to skip rendering this component. 
(Default: true)

drawText

AttributeTypeDescription
textStringThe text to render.
textColorStringThe text color. 
(Default: #000000)
fontNameStringThe name of the font. 
(Default: SansSerif)
fontStyleStringFont style: plain, bold, italic 
They can be combined using comma: bold,italic 
(Default: plain)
fontSizeintThe point size of the font. 
(Default: 12)
fontAntialiasStringPossible values: ON, OFF, GASP, HBGR, HRGB, VBGR, VRGB 
(Default: ON)
useBaselinebooleanSet this to true to use the baseline as a base for Y-axis. 
(Default: false)
positionString{X},{Y} 
where {X} can be: left, right, center or a math expression 
where {Y} can be: top, bottom, center or a math expression 
 
(Default: 0,0) 
 
See Types and Concepts.
alphaintThe transparency value in %, where 0 is completely transparent and 100 is opaque. 
(Default: 100)
isVisiblebooleanSet this to false to skip rendering this component. 
(Default: true)

drawImagesFromText

The bounds are defined by the total width of each image including padding and the height equals the tallest image.

AttributeTypeDescription
textStringThe text to render using the mapped images.
imageNamePrefixString[Required] The images name prefix.
paddingintThe padding between characters.
alignmentAlignmentYou can write the text either horizontally (HORIZONTAL) or vertically (VERTICAL) 
(Default: HORIZONTAL)
positionString{X},{Y} 
where {X} can be: left, right, center or a math expression 
where {Y} can be: top, bottom, center or a math expression 
 
(Default: 0,0) 
 
See Types and Concepts.
imagePositionStringThe position of each image relative to its bounds. 
 
{X},{Y} 
where {X} can be: left, right, center or a math expression 
where {Y} can be: top, bottom, center or a math expression 
 
(Default: left,bottom) 
 
See Types and Concepts.
alphaintThe transparency value in %, where 0 is completely transparent and 100 is opaque. 
(Default: 100)
isVisiblebooleanSet this to false to skip rendering this component. 
(Default: true)

Layouts

Layouts are simply containers that define a set of attributes that the drawables are bound to.

flowLayout

AttributeTypeDescription
paddingintThe padding (in pixels) between drawables. 
(Default: 0)
alignmentAlignmentThe rendering alignment: HORIZONTAL or VERTICAL 
(Default: HORIZONTAL)
isVisiblebooleanSet this to false to skip rendering this component. 
(Default: true)
alphaintThe transparency value in %, where 0 is completely transparent and 100 is opaque. 
(Default: 100)
drawList<Drawable>Drawables. 
Like: <drawImage> and <drawText>

positionalLayout

AttributeTypeDescription
sizeintThe size (bounds) of this layout. 
(Default: 0,0)
alphaintThe transparency value in %, where 0 is completely transparent and 100 is opaque. 
(Default: 100)
isVisiblebooleanSet this to false to skip rendering this component. 
(Default: true)
drawList<Drawable>Drawables. 
Like: <drawImage> and <drawText>