Offers functions to define, access, and draw, a set of image components on a single graphical surface or Texture. More...
Public Member Functions | |
Texture | getTexture () |
return Texture object for this Imageset | |
string | getName () |
return String object holding the name of the Imageset | |
int | getImageCount () |
return number of images defined for this Imageset | |
bool | isImageDefined (string name) |
return true if an Image with the specified name exists. | |
Image | getImage (string name) |
return a copy of the Image object for the named image | |
void | undefineImage (string name) |
remove the definition for the Image with the specified name. If no such Image exists, nothing happens. | |
void | undefineAllImages () |
Removes the definitions for all Image objects currently defined in the Imageset. | |
Size | getImageSize (string name) |
return a Size object describing the dimensions of the named image. | |
float | getImageWidth (string name) |
return the width of the named image. | |
float | getImageHeight (string name) |
return the height of the named image. | |
Point | getImageOffset (string name) |
return the rendering offsets applied to the named image. | |
float | getImageOffsetX (string name) |
return the x rendering offset for the named image. | |
float | getImageOffsetY (string name) |
return the y rendering offset for the named image. | |
void | defineImage (string name, Point position, Size size, Point render_offset) |
Define a new Image for this Imageset. | |
void | defineImage (string name, Rect image_rect, Point render_offset) |
Define a new Image for this Imageset. | |
bool | isAutoScaled () |
Return whether this Imageset is auto-scaled. | |
Size | getNativeResolution () |
Return the native display size for this Imageset. This is only relevant if the Imageset is being auto-scaled. | |
void | setAutoScalingEnabled (bool setting) |
Enable or disable auto-scaling for this Imageset. | |
void | setNativeResolution (Size size) |
Set the native resolution for this Imageset. | |
void | notifyScreenResolution (Size size) |
Notify the Imageset of the current (usually new) display resolution. | |
void | setDefaultResourceGroup (string resourceGroup) |
Sets the default resource group to be used when loading imageset data. | |
string | getDefaultResourceGroup () |
Returns the default resource group currently set for Imagesets. |
Qualified Iterators | |
Image | Image |
Can be used to iterate over the Image objects in the Imageset. |
Offers functions to define, access, and draw, a set of image components on a single graphical surface or Texture.
Imageset objects are a means by which a single graphical image (file, Texture, etc), can be split into a number of 'components' which can later be accessed via name. The components of an Imageset can queried for various details, and sent to the Renderer object for drawing.
Texture GUI::Imageset::getTexture | ( | ) |
string GUI::Imageset::getName | ( | ) |
int GUI::Imageset::getImageCount | ( | ) |
bool GUI::Imageset::isImageDefined | ( | string | name | ) |
Image GUI::Imageset::getImage | ( | string | name | ) |
void GUI::Imageset::undefineImage | ( | string | name | ) |
void GUI::Imageset::undefineAllImages | ( | ) |
Size GUI::Imageset::getImageSize | ( | string | name | ) |
float GUI::Imageset::getImageWidth | ( | string | name | ) |
float GUI::Imageset::getImageHeight | ( | string | name | ) |
Point GUI::Imageset::getImageOffset | ( | string | name | ) |
float GUI::Imageset::getImageOffsetX | ( | string | name | ) |
float GUI::Imageset::getImageOffsetY | ( | string | name | ) |
Define a new Image for this Imageset.
name | String object holding the name that will be assigned to the new Image, which must be unique within the Imageset. |
position | Point object describing the pixel location of the Image on the image file / texture associated with this Imageset. |
size | Size object describing the dimensions of the Image, in pixels. |
render_offset | Point object describing the offsets, in pixels, that are to be applied to the Image when it is drawn. |
Define a new Image for this Imageset.
name | String object holding the name that will be assigned to the new Image, which must be unique within the Imageset. |
image_rect | Rect object describing the area on the image file / texture associated with this Imageset that will be used for the Image. |
render_offset | Point object describing the offsets, in pixels, that are to be applied to the Image when it is drawn. |
bool GUI::Imageset::isAutoScaled | ( | ) |
Size GUI::Imageset::getNativeResolution | ( | ) |
void GUI::Imageset::setAutoScalingEnabled | ( | bool | setting | ) |
Enable or disable auto-scaling for this Imageset.
setting | true to enable auto-scaling, false to disable auto-scaling. |
void GUI::Imageset::setNativeResolution | ( | Size | size | ) |
void GUI::Imageset::notifyScreenResolution | ( | Size | size | ) |
void GUI::Imageset::setDefaultResourceGroup | ( | string | resourceGroup | ) |
Sets the default resource group to be used when loading imageset data.
resourceGroup | String describing the default resource group identifier to be used. |
string GUI::Imageset::getDefaultResourceGroup | ( | ) |
Returns the default resource group currently set for Imagesets.