Skip to content
Adriano edited this page Dec 22, 2015 · 2 revisions

The XML element contains the image for all animations.

Example:

<image>
    <tilesx>2</tilesx>
    <tilesy>2</tilesy>
    <png><![CDATA[iVBORw0KGgoAAAANS ... wuDY9z7axAAAAAElFTkSuQmCC]]></png>
    <transparency>Magenta</transparency>
</image>

Sample image:

2x2 image grid

image element

Is the child of the root of the XML document.

This element doesn't have any attributes, only child elements.

<tilesx> element required

Max occurs: 1

Type: Number

How many images in a row (columns). If your image has a with of 80px and tilesx is 2, every frame will have a width of 40px (80px / 2).

<tilesy> element required

Max occurs: 1

Type: Number

How many images in a column (rows). If your image has a height of 80px and tilesy is 2, every frame will have a height of 40px (80px / 2).

<png> element required

Max occurs: 1

Type: String/CDATA

The main image for your application. This image contains all possible frames for your animations. With the sample image, it is possible to create 2 animations: walk and run animations.

Note: each animation frame must have the same size! So you can't create an animation frame of size 40x40 and another with the size of 60x60.

The image is a base64 encoded string, use this tool: image to base64 to generate the string from your PNG image.

(*) Transparency is allowed, but only with 100% or 0%! If you add a 50% alpha, the pixels will be replaced by the window background color. This, because C# doesn't allow half transparency on the windows-form.

<transparency> element required

Max occurs: 1

Type: String/Color

On Windows, each window has a background color. This application use a C#-function that remove the background from the window. To do this, a transparency color must be defined. So each pixel in the window with exactly this color will be transparent. Default value is "Magenta", but if you use magenta for your pet, you should insert another color. Use one of the .NET colors: Microsoft colors

Clone this wiki locally