Sprite

Sprites give more precise control over the geometry of 2D elements.

They are 9-Patch images that support tiling patterns while keeping a minimal usage of textures.

For example, this small texture dirt can be used as a Sprite to achieve the dirt marks in this sequence:

../_images/dirt.gif

To create a Sprite, click on the Create Button create_button in the Assets View and select Sprite.

Sprite properties

Texture

The texture used by the Sprite.

Border Size

The border around the sprite, that the defines the structure of the 9 Patches.

../_images/border.png

For example, the following super tiny texture dialog, with a border of (4, 4) can produce a dialog box of any size:

../_images/dialog.gif

Render Mode

Specifies how the middle of the Sprite is presented.

  • Tile

    ../_images/sprite-tiling.png
  • Stretch

    ../_images/sprite-stretching.png