VerticalResizeImage

The VerticalResizeImage allows you to create an image that will automatically resize to fit a window of any height.

Summary
VerticalResizeImageThe VerticalResizeImage allows you to create an image that will automatically resize to fit a window of any height.
Implementation DetailsThe VerticalImage requires a set of texture coordinates to specify the different portions of the image.
XML DefinitionThis is the VerticalResizeImage 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 AttributesThese are optional.
textureScaleThe scale of the texture to be used for the image artwork.
reverseFillWhen set, the image will tile from bottom to top, rather than top to bottom.
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 slice references for each component of the tile-able image.
FunctionsThe VerticalResizeImage must be defined entirely in XML and does not have any run-time functions.

Implementation Details

The VerticalImage 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 to create the HorizontalResizeImage used in the VerticalScrollbar on the right.

XML Definition

This is the VerticalResizeImage 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 AttributesThese are optional.
textureScaleThe scale of the texture to be used for the image artwork.
reverseFillWhen set, the image will tile from bottom to top, rather than top to bottom.
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 slice references for each component of the tile-able image.

XML Tag

<VerticalResizeImage>
....
</VerticalResizeImage>

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

These are optional.  You can use whichever apply to the DynamicImage you are creating.

textureScale

The scale of the texture to be used for the image artwork.  This is multiplied by the image’s <Size> to determine the texture dimensions.

Expects

A number value.  (1.0 = 100%)

Default Value

  • 1.0

reverseFill

When set, the image will tile from bottom to top, rather than top to bottom.

Expects

A boolean value.

”true”Tile top->bottom.
”false”Tile bottom->top.

Default Value

  • ”false”

Required Elements

Sizes

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

Syntax

<Sizes top="20" middle="44" bottom="20" />
topThe pixel height of the top end of the image.  This is not resized.
middleThe pixel height of the middle tilable portion of the image.
bottomThe pixel height of the bottom end of the image.  This is not resized.

Defaults

top0
middle0
bottom0

Notes

  • The pixel width is taken from the window’s <Size> element.  All instances of a VerticalResizeImage should use a width value equivalent to the size of the artwork.  If the height changes, the image will not tile or shrink vertically.  If you need this, use a FullResizeImage defintion instead.
  • The top and bottom values may be 0 if you do not wish to have static ends on your image.

TexCoords

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

Syntax

<TexCoords>
<Top x="715" y="380" />
<Middle x="715" y="409" />
<Bottom x="715" y="453" />
</TexCoords>
TopThe top left corner of the image.  (not tiled).
MiddleThe coordinate used for the tile-able center of the image.
BottomThe bottom left 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 a top/bottom edge to the image.

TexSlices

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

Syntax

<TexSlices>
<Top id="TopSlice" />
<Middle id="MiddleSlice" />
<Bottom id="BottomSlice" />
</TexSlices>
LeftThe top left corner of the image.  (not tiled).
MiddleThe coordinates used for the tile-able center of the image.
RightThe top left corner of the image.  (not tiled).

Defaults

For all slices...

id = “”

Functions

The VerticalResizeImage 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.
The VerticalScrollbar provides a windows-style scroll bar.
The FullResizeImage allows you to create automatically tiling images to produce backgrounds and frame.