FullResizeImage

The FullResizeImage allows you to create automatically tiling images to produce backgrounds and frame.  Provided with a set of border and tile-able coordinates, this window element will automatically tile a texture to create a window of any size.

Summary
FullResizeImageThe FullResizeImage allows you to create automatically tiling images to produce backgrounds and frame.
Implementation DetailsThe FullResizeImage requires a set of texture coordinates to specify the different portions of the image.
XML DefinitionThis is the FullResizeImage xml definition.
XML Tag
Required AttributesRequired for the window element to create itself properly.
textureName of the Ui Texture to use to create the tiled image..
Optional Attributes
frameonlyIf true, does not render the middle middle section of the image.
Required Elements
SizesThe dimensions in the texture for each tillable component of the image.
TexCoordsThe texture coordinates for each component of the tile-able image.
TexSlicesThe texture coordinates for each component of the tile-able image.
FunctionsThe FullResizeImage must be defined entirely in XML and does not have any run-time functions.

Implementation Details

The FullResizeImage requires a set of texture coordinates to specify the different portions of the image.

These are defined by the Sizes and TexCoords elements.  See the following illustration for an example of how to determine the correct values.  The texture shown on the left is used to provide the background for both of the windows on the right.

XML Definition

This is the FullResizeImage xml definition.

Summary
XML Tag
Required AttributesRequired for the window element to create itself properly.
textureName of the Ui Texture to use to create the tiled image..
Optional Attributes
frameonlyIf true, does not render the middle middle section of the image.
Required Elements
SizesThe dimensions in the texture for each tillable component of the image.
TexCoordsThe texture coordinates for each component of the tile-able image.
TexSlicesThe texture coordinates for each component of the tile-able image.

XML Tag

<FullResizeImage>
....
</FullResizeImage>

Required Attributes

Required for the window element to create itself properly.

texture

Name of the Ui Texture to use to create the tiled image..

Expects

A string value, which is the name of a valid ui Texture.

Default Value

  • ””

Optional Attributes

frameonly

If true, does not render the middle middle section of the image.

Expects

”true” or “false”

Default Value

”false”

Required Elements

Sizes

The dimensions in the texture for each tillable component of the image.

Syntax

<Sizes>
<TopLeft x="15" y="15" />
<BottomRight x="15" y="15" />
<Middle x="68" y="36" />
</Sizes>
TopLeftThe pixel width and height for the top left corner of the image.  This is not resized.
BottomRightThe pixel width and height for the bottom right corner of the image.  This is not resized.
MiddleThe pixel width and height of the tilable middle portion of the image.

Defaults

For all sizes...

x0
y0

TexCoords

The texture coordinates for each component of the tile-able image.

Syntax

<TexCoords>
<TopLeft x="0" y="0" />
<TopCenter x="15" y="0" />
<TopRight x="83" y="0" />
<MiddleLeft x="0" y="15" />
<MiddleCenter x="15" y="15" />
<MiddleRight x="83" y="15" />
<BottomLeft x="0" y="52" />
<BottomCenter x="15" y="52" />
<BottomRight x="83" y="52" />
</TexCoords>
TopLeftThe top left corner of the image.  (not tiled).
TopCenterThe coordinate used for the tile-able portion of the top edge.
TopRightThe top right corner of the image.  (not tiled).
MiddleLeftThe coordinate used for the tila-able portion of the left edge.
MiddleCenterThe coordinate used for the tile-able center of the image.
MiddleRightThe coordinate used for the tila-able portion of the right edge.
TopLeftThe bottom left corner of the image.  (not tiled).
TopCenterThe coordinate used for the tile-able portion of the bottom edge.
TopRightThe bottom right corner of the image.  (not tiled).

Defaults

For all coordinates...

x0
y0

Notes

  • The middle coordinates are REQUIRED.  The top/bottom are optional if you do not wish to include a border on your image.

TexSlices

The texture coordinates for each component of the tile-able image.

Syntax

<TexSlices>
<TopLeft id="TopLeft" />
<TopCenter id="TopCenter" />
<TopRight id="TopRight" />
<MiddleLeft id="MiddleLeft" />
<MiddleCenter id="MiddleCenter" />
<MiddleRight id="MiddleRight" />
<BottomLeft id="BottomLeft" />
<BottomCenter id="BottomCenter" />
<BottomRight id="BottomRight" />
</TexSlices>
TopLeftThe top left corner of the image.  (not tiled).
TopCenterThe coordinate used for the tile-able portion of the top edge.
TopRightThe top right corner of the image.  (not tiled).
MiddleLeftThe coordinate used for the tile-able portion of the left edge.
MiddleCenterThe coordinate used for the tile-able center of the image (or not, if frameonly).
MiddleRightThe coordinate used for the tile-able portion of the right edge.
TopLeftThe bottom left corner of the image.  (not tiled).
TopCenterThe coordinate used for the tile-able portion of the bottom edge.
TopRightThe bottom right corner of the image.  (not tiled).

Defaults

For all slices ...

x0
y0
width0
height0

Notes

  • The middle coordinates are REQUIRED.  The top/bottom are optional if you do not wish to include a border on your image.

Functions

The FullResizeImage must be defined entirely in XML and does not have any run-time functions.

This element defines a single art texture component.
The dimensions in the texture for each tillable component of the image.
The texture coordinates for each component of the tile-able image.