Crazy Eddies GUI System  0.7.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Imageset XML files.
Author
Paul D Turner

An Imageset is a collection of named regions upon some source surface, such as an image file or texture. In CEGUI terminology, each of these named regions is an Image and is the basic level of imagery used by CEGUI.


Overview

The reference for each element is arranged into sections, as described below:

  • Purpose:
    • This section describes what the elements general purpose is within the specifications.
  • Attributes:
    • This section describes available attributes for the elements, and whether they are required or optional.
  • Usage:
    • Describes where the element may appear, whether the element may have sub-elements, and other important usage information.
  • Examples:
    • For many elements, this section will contain brief examples showing the element used in context.


<Imageset> Element

  • Purpose:
    • The <Imageset> element is the root element in XML imageset definition files.
  • Attributes:
    • Name: Specifies the name that will be assigned to the Imageset in the CEGUI system. Required Attribute.
    • Imagefile: Specifies the path to the image file containing the imagery for the imageset. Required attribute.
    • ResourceGroup: Specifies the resource group identifier to pass to the ResourceProvider when loading the file given in the Imagefile attribute. Optional attribute, default is the Imageset default group.
    • AutoScaled: Boolean property that states whether to scale imagery so it appears the same physical size at any resolution. The specified native resolution values indicate the resolution that will result in a one-to-one (i.e. unscaled) mapping from source to destination. At resolutions higher than the native, the imagery will be scaled up to take up more space, and at resolutions lower than the native, the imagery will be scaled down to take up less space. Optional attribute, default is false.
    • NativeHorzRes: When AutoScaled is enabled, specifies the horizontal screen resolution that will result in an unscaled, one-to-one mapping of pixels from the source image to the destination surface. Optional attribute, default is 640.
    • NativeVertRes: When AutoScaled is enabled, specifies the vertical screen resolution that will result in an unscaled, one-to-one mapping of pixels from the source image to the destination surface. Optional attribute, default is 480.
  • Usage:
    • The <Imageset> element is the root element for imageset files.
    • The <Imageset> element may contain any number of <Image> elements.
    • No element may contain <Imageset> elements as a sub-element.
  • Examples:


<Image> Element

  • Purpose:
    • Defines a single component image of an imageset.
  • Attributes:
    • Name: Specifies the name that will be used to identify the image within the Imageset. Required attribute.
    • XPos: Specifies the X pixel co-ordinate of the top-left corner of the image on the source surface. Required attribute.
    • YPos: Specifies the Y pixel co-ordinate of the top-left corner of the image on the source surface. Required attribute.
    • Width: Specifies the width of the image in pixels. Required attribute.
    • Height: Specifies the height of the image in pixels. Required attibute.
    • XOffset: Specifies a horizontal offset to apply when rendering the image. Optional attribute, default is 0.
    • YOffset: Specifies a vertical offset to apply when rendering the image. Optional attribute, default is 0.
  • Usage:
    • The <Image> element may only appear as a sub-element of the <Imageset> element.
    • The <Image> element may not contain any sub-elements.
  • Examples: