#include <CEGUIImageset.h>
Collaboration diagram for CEGUI::Imageset:
Public Types | |
typedef ConstBaseIterator< ImageRegistry > | ImageIterator |
Iterator type for this collection. | |
Public Member Functions | |
~Imageset (void) | |
Destroys Imageset objects. | |
Texture * | getTexture (void) const |
return Texture object for this Imageset | |
const String & | getName (void) const |
return String object holding the name of the Imageset | |
uint | getImageCount (void) const |
return number of images defined for this Imageset | |
bool | isImageDefined (const String &name) const |
return true if an Image with the specified name exists. | |
const Image & | getImage (const String &name) const |
return a copy of the Image object for the named image | |
void | undefineImage (const String &name) |
remove the definition for the Image with the specified name. If no such Image exists, nothing happens. | |
void | undefineAllImages (void) |
Removes the definitions for all Image objects currently defined in the Imageset. | |
Size | getImageSize (const String &name) const |
return a Size object describing the dimensions of the named image. | |
float | getImageWidth (const String &name) const |
return the width of the named image. | |
float | getImageHeight (const String &name) const |
return the height of the named image. | |
Point | getImageOffset (const String &name) const |
return the rendering offsets applied to the named image. | |
float | getImageOffsetX (const String &name) const |
return the x rendering offset for the named image. | |
float | getImageOffsetY (const String &name) const |
return the y rendering offset for the named image. | |
void | defineImage (const String &name, const Point &position, const Size &size, const Point &render_offset) |
Define a new Image for this Imageset. | |
void | defineImage (const String &name, const Rect &image_rect, const Point &render_offset) |
Define a new Image for this Imageset. | |
void | draw (const Rect &source_rect, const Rect &dest_rect, float z, const Rect &clip_rect, const ColourRect &colours, QuadSplitMode quad_split_mode) const |
Queues an area of the associated Texture the be drawn on the screen. Low-level routine to be used carefully! | |
void | draw (const Rect &source_rect, const Rect &dest_rect, float z, const Rect &clip_rect, const colour &top_left_colour=0xFFFFFFFF, const colour &top_right_colour=0xFFFFFFFF, const colour &bottom_left_colour=0xFFFFFFFF, const colour &bottom_right_colour=0xFFFFFFFF, QuadSplitMode quad_split_mode=TopLeftToBottomRight) const |
Queues an area of the associated Texture the be drawn on the screen. Low-level routine to be used carefully! | |
bool | isAutoScaled (void) const |
Return whether this Imageset is auto-scaled. | |
Size | getNativeResolution (void) const |
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 (const Size &size) |
Set the native resolution for this Imageset. | |
void | notifyScreenResolution (const Size &size) |
Notify the Imageset of the current (usually new) display resolution. | |
ImageIterator | getIterator (void) const |
Return an Imageset::ImageIterator object that can be used to iterate over the Image objects in the Imageset. | |
void | writeXMLToStream (OutStream &out_stream) const |
Writes an xml representation of this Imageset to out_stream. | |
Protected Member Functions | |
void | load (const String &filename, const String &resourceGroup) |
Initialise the Imageset with information taken from the specified file. | |
void | unload (void) |
Unloads all loaded data and leaves the Imageset in a clean (but un-usable) state. This should be called for cleanup purposes only. | |
void | setTexture (Texture *texture) |
set the Texture object to be used by this Imageset. Changing textures on an Imageset that is in use is not a good idea! | |
void | updateImageScalingFactors (void) |
Sets the scaling factor for all Images that are a part of this Imageset. | |
Protected Attributes | |
String | d_name |
Holds the name of this imageset. | |
ImageRegistry | d_images |
Registry of Image objects for the images defined for this Imageset. | |
Texture * | d_texture |
Texture object that handles imagery for this Imageset. | |
String | d_textureFilename |
String holding the name of the texture filename (if any). | |
bool | d_autoScale |
true when auto-scaling is enabled. | |
float | d_horzScaling |
current horizontal scaling factor. | |
float | d_vertScaling |
current vertical scaling factor. | |
float | d_nativeHorzRes |
native horizontal resolution for this Imageset. | |
float | d_nativeVertRes |
native vertical resolution for this Imageset. | |
Static Protected Attributes | |
static const char | ImagesetSchemaName [] = "Imageset.xsd" |
Filename of the XML schema used for validating Imageset files. | |
Friends | |
class | Imageset_xmlHandler |
Imageset * | ImagesetManager::createImageset (const String &name, Texture *texture) |
Imageset * | ImagesetManager::createImageset (const String &filename, const String &resourceGroup) |
Imageset * | ImagesetManager::createImagesetFromImageFile (const String &name, const String &filename, const String &resourceGroup) |
void | ImagesetManager::destroyImageset (const String &name) |
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.
Definition at line 58 of file CEGUIImageset.h.
|
Iterator type for this collection.
Definition at line 140 of file CEGUIImageset.h. |
|
Destroys Imageset objects.
Definition at line 105 of file CEGUIImageset.cpp. References unload(). |
|
Define a new Image for this Imageset.
Definition at line 176 of file CEGUIImageset.cpp. References CEGUI_LOGINSANE, d_autoScale, d_horzScaling, d_images, d_name, d_vertScaling, and isImageDefined(). |
|
Define a new Image for this Imageset.
Definition at line 336 of file CEGUIImageset.h. References CEGUI::Size::d_height, CEGUI::Size::d_width, CEGUI::Vector2::d_x, and CEGUI::Vector2::d_y. Referenced by CEGUI::Imageset_xmlHandler::elementStart(). |
|
Queues an area of the associated Texture the be drawn on the screen. Low-level routine to be used carefully!
Definition at line 425 of file CEGUIImageset.h. |
|
Queues an area of the associated Texture the be drawn on the screen. Low-level routine to be used carefully!
Definition at line 198 of file CEGUIImageset.cpp. References CEGUI::Renderer::addQuad(), CEGUI::Rect::d_bottom, CEGUI::Rect::d_left, CEGUI::Rect::d_right, d_texture, CEGUI::Rect::d_top, CEGUI::Rect::getHeight(), CEGUI::Texture::getHeight(), CEGUI::Rect::getIntersection(), CEGUI::Texture::getRenderer(), CEGUI::Texture::getWidth(), CEGUI::Rect::getWidth(), and PixelAligned. Referenced by CEGUI::Image::draw(). |
|
return a copy of the Image object for the named image
Definition at line 160 of file CEGUIImageset.cpp. References d_images, and d_name. Referenced by CEGUI::Font_xmlHandler::elementStart(), CEGUI::ImageDim::getValue_impl(), CEGUI::FrameWindow::setEWSizingCursorImage(), CEGUI::ImageryComponent::setImage(), CEGUI::FrameComponent::setImage(), CEGUI::Window::setMouseCursor(), CEGUI::FrameWindow::setNESWSizingCursorImage(), CEGUI::FrameWindow::setNSSizingCursorImage(), CEGUI::FrameWindow::setNWSESizingCursorImage(), and CEGUI::PropertyHelper::stringToImage(). |
|
return number of images defined for this Imageset
Definition at line 172 of file CEGUIImageset.h. |
|
return the height of the named image.
Definition at line 267 of file CEGUIImageset.h. |
|
return the rendering offsets applied to the named image.
Definition at line 282 of file CEGUIImageset.h. |
|
return the x rendering offset for the named image.
Definition at line 297 of file CEGUIImageset.h. |
|
return the y rendering offset for the named image.
Definition at line 312 of file CEGUIImageset.h. |
|
return a Size object describing the dimensions of the named image.
Definition at line 237 of file CEGUIImageset.h. |
|
return the width of the named image.
Definition at line 252 of file CEGUIImageset.h. |
|
Return an Imageset::ImageIterator object that can be used to iterate over the Image objects in the Imageset.
Definition at line 346 of file CEGUIImageset.cpp. References d_images. Referenced by writeXMLToStream(). |
|
return String object holding the name of the Imageset
Definition at line 162 of file CEGUIImageset.h. Referenced by CEGUI::ImagesetManager::createImageset(), CEGUI::ImagesetManager::destroyImageset(), CEGUI::Image::getImagesetName(), and CEGUI::Scheme::loadResources(). |
|
Return the native display size for this Imageset. This is only relevant if the Imageset is being auto-scaled.
Definition at line 448 of file CEGUIImageset.h. |
|
return Texture object for this Imageset
Definition at line 152 of file CEGUIImageset.h. |
|
Return whether this Imageset is auto-scaled.
Definition at line 438 of file CEGUIImageset.h. |
|
return true if an Image with the specified name exists.
Definition at line 185 of file CEGUIImageset.h. Referenced by defineImage(). |
|
Initialise the Imageset with information taken from the specified file.
Definition at line 128 of file CEGUIImageset.cpp. References CEGUI::String::empty(), CEGUI::Errors, CEGUI::Logger::getSingleton(), CEGUI::System::getSingleton(), CEGUI::System::getXMLParser(), ImagesetSchemaName, CEGUI::Logger::logEvent(), CEGUI::XMLParser::parseXMLFile(), and unload(). |
|
Notify the Imageset of the current (usually new) display resolution.
Definition at line 299 of file CEGUIImageset.cpp. References d_autoScale, CEGUI::Size::d_height, d_horzScaling, d_nativeHorzRes, d_nativeVertRes, d_vertScaling, CEGUI::Size::d_width, and updateImageScalingFactors(). Referenced by CEGUI::Font::notifyScreenResolution(), and setNativeResolution(). |
|
Enable or disable auto-scaling for this Imageset.
Definition at line 272 of file CEGUIImageset.cpp. References d_autoScale, and updateImageScalingFactors(). Referenced by CEGUI::Imageset_xmlHandler::elementStart(), and CEGUI::Font::setAutoScalingEnabled(). |
|
Set the native resolution for this Imageset.
Definition at line 286 of file CEGUIImageset.cpp. References CEGUI::Size::d_height, d_nativeHorzRes, d_nativeVertRes, CEGUI::Size::d_width, CEGUI::System::getSingleton(), and notifyScreenResolution(). Referenced by CEGUI::Imageset_xmlHandler::elementStart(), and CEGUI::Font::setNativeResolution(). |
|
set the Texture object to be used by this Imageset. Changing textures on an Imageset that is in use is not a good idea!
Definition at line 114 of file CEGUIImageset.cpp. References d_texture. |
|
Removes the definitions for all Image objects currently defined in the Imageset.
Definition at line 360 of file CEGUIImageset.cpp. References CEGUI_LOGINSANE, d_images, and d_name. Referenced by unload(). |
|
remove the definition for the Image with the specified name. If no such Image exists, nothing happens.
Definition at line 352 of file CEGUIImageset.cpp. References CEGUI_LOGINSANE, d_images, and d_name. |
|
Unloads all loaded data and leaves the Imageset in a clean (but un-usable) state. This should be called for cleanup purposes only.
Definition at line 232 of file CEGUIImageset.cpp. References d_texture, CEGUI::Renderer::destroyTexture(), CEGUI::System::getRenderer(), CEGUI::System::getSingleton(), and undefineAllImages(). Referenced by load(), and ~Imageset(). |
|
Sets the scaling factor for all Images that are a part of this Imageset.
Definition at line 245 of file CEGUIImageset.cpp. References d_autoScale, d_horzScaling, d_images, and d_vertScaling. Referenced by notifyScreenResolution(), and setAutoScalingEnabled(). |
|
Writes an xml representation of this Imageset to out_stream.
Definition at line 311 of file CEGUIImageset.cpp. References d_autoScale, d_name, d_nativeHorzRes, d_nativeVertRes, d_textureFilename, CEGUI::ConstBaseIterator< T >::getCurrentValue(), getIterator(), and CEGUI::ConstBaseIterator< T >::isAtEnd(). Referenced by CEGUI::ImagesetManager::writeImagesetToStream(). |
|
Definition at line 60 of file CEGUIImageset.h. |
|
|
|
|
|
|
|
|
|
true when auto-scaling is enabled.
Definition at line 579 of file CEGUIImageset.h. Referenced by defineImage(), notifyScreenResolution(), setAutoScalingEnabled(), updateImageScalingFactors(), and writeXMLToStream(). |
|
current horizontal scaling factor.
Definition at line 580 of file CEGUIImageset.h. Referenced by defineImage(), notifyScreenResolution(), and updateImageScalingFactors(). |
|
Registry of Image objects for the images defined for this Imageset.
Definition at line 574 of file CEGUIImageset.h. Referenced by defineImage(), getImage(), getIterator(), undefineAllImages(), undefineImage(), and updateImageScalingFactors(). |
|
Holds the name of this imageset.
Definition at line 573 of file CEGUIImageset.h. Referenced by defineImage(), CEGUI::Imageset_xmlHandler::elementEnd(), CEGUI::Imageset_xmlHandler::elementStart(), getImage(), undefineAllImages(), undefineImage(), and writeXMLToStream(). |
|
native horizontal resolution for this Imageset.
Definition at line 582 of file CEGUIImageset.h. Referenced by notifyScreenResolution(), setNativeResolution(), and writeXMLToStream(). |
|
native vertical resolution for this Imageset.
Definition at line 583 of file CEGUIImageset.h. Referenced by notifyScreenResolution(), setNativeResolution(), and writeXMLToStream(). |
|
Texture object that handles imagery for this Imageset.
Definition at line 575 of file CEGUIImageset.h. Referenced by draw(), CEGUI::Imageset_xmlHandler::elementStart(), setTexture(), and unload(). |
|
String holding the name of the texture filename (if any).
Definition at line 576 of file CEGUIImageset.h. Referenced by CEGUI::Imageset_xmlHandler::elementStart(), and writeXMLToStream(). |
|
current vertical scaling factor.
Definition at line 581 of file CEGUIImageset.h. Referenced by defineImage(), notifyScreenResolution(), and updateImageScalingFactors(). |
|
Filename of the XML schema used for validating Imageset files.
Definition at line 46 of file CEGUIImageset.cpp. Referenced by load(). |