30 #ifndef _CEGUIImageset_h_
31 #define _CEGUIImageset_h_
33 #include "CEGUIBase.h"
34 #include "CEGUIString.h"
35 #include "CEGUIRect.h"
36 #include "CEGUIColourRect.h"
37 #include "CEGUIImagesetManager.h"
38 #include "CEGUIImage.h"
39 #include "CEGUIIteratorBase.h"
40 #include "CEGUIXMLSerializer.h"
46 # pragma warning(push)
47 # pragma warning(disable : 4251)
65 typedef std::map<String, Image, String::FastLessCompare> ImageRegistry;
183 void undefineImage(
const String& name);
192 void undefineAllImages(
void);
308 defineImage(name,
Rect(position.d_x, position.d_y, position.d_x + size.d_width, position.d_y + size.d_height), render_offset);
330 void defineImage(
const String& name,
const Rect& image_rect,
const Point& render_offset);
366 const Rect& dest_rect,
const Rect* clip_rect,
410 const Rect& dest_rect,
const Rect* clip_rect,
411 const colour& top_left_colour = 0xFFFFFFFF,
412 const colour& top_right_colour = 0xFFFFFFFF,
413 const colour& bottom_left_colour = 0xFFFFFFFF,
414 const colour& bottom_right_colour = 0xFFFFFFFF,
417 draw(buffer, source_rect, dest_rect, clip_rect,
419 bottom_left_colour, bottom_right_colour),
453 void setAutoScalingEnabled(
bool setting);
466 void setNativeResolution(
const Size& size);
476 void notifyDisplaySizeChanged(
const Size& size);
483 ImageIterator getIterator(
void)
const;
512 { d_defaultResourceGroup = resourceGroup; }
523 {
return d_defaultResourceGroup; }
548 void setTexture(
Texture* texture);
558 void updateImageScalingFactors(
void);
579 #if defined(_MSC_VER)
580 # pragma warning(pop)
583 #endif // end of guard _CEGUIImageset_h_
float getImageWidth(const String &name) const
return the width of the named image.
Definition: CEGUIImageset.h:222
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
Point getImageOffset(const String &name) const
return the rendering offsets applied to the named image.
Definition: CEGUIImageset.h:252
float getImageHeight(const String &name) const
return the height of the named image.
Definition: CEGUIImageset.h:237
Class that represents a single Image of an Imageset.
Definition: CEGUIImage.h:57
float getImageOffsetX(const String &name) const
return the x rendering offset for the named image.
Definition: CEGUIImageset.h:267
Texture * d_texture
Texture object that handles imagery for this Imageset.
Definition: CEGUIImageset.h:565
Diagonal split goes from top-left to bottom-right.
Definition: CEGUIRenderer.h:47
const String & getName(void) const
return String object holding the name of the Imageset
Definition: CEGUIImageset.h:133
static void setDefaultResourceGroup(const String &resourceGroup)
Sets the default resource group to be used when loading imageset data.
Definition: CEGUIImageset.h:511
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: CEGUIGeometryBuffer.h:42
Class that holds the size (width & height) of something.
Definition: CEGUISize.h:43
void draw(GeometryBuffer &buffer, const Rect &source_rect, const Rect &dest_rect, 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 car...
Definition: CEGUIImageset.h:409
Class representing colour values within the system.
Definition: CEGUIcolour.h:45
Class that holds details of colours for the four corners of a rectangle.
Definition: CEGUIColourRect.h:44
Offers functions to define, access, and draw, a set of image components on a single graphical surface...
Definition: CEGUIImageset.h:63
void defineImage(const String &name, const Point &position, const Size &size, const Point &render_offset)
Define a new Image for this Imageset.
Definition: CEGUIImageset.h:306
Base class constant iterator used to offer iteration over various collections within the system...
Definition: CEGUIIteratorBase.h:47
Size getImageSize(const String &name) const
return a Size object describing the dimensions of the named image.
Definition: CEGUIImageset.h:207
float d_nativeHorzRes
native horizontal resolution for this Imageset.
Definition: CEGUIImageset.h:572
ConstBaseIterator< ImageRegistry > ImageIterator
Iterator type for this collection.
Definition: CEGUIImageset.h:111
QuadSplitMode
Enumerated type that contains the valid diagonal-mode that specify how a quad is split into triangles...
Definition: CEGUIRenderer.h:44
static String d_defaultResourceGroup
Default resource group specifically for Imagesets.
Definition: CEGUIImageset.h:574
Abstract base class specifying the required interface for Texture objects.
Definition: CEGUITexture.h:50
Size getNativeResolution(void) const
Return the native display size for this Imageset. This is only relevant if the Imageset is being auto...
Definition: CEGUIImageset.h:440
float d_nativeVertRes
native vertical resolution for this Imageset.
Definition: CEGUIImageset.h:573
bool isImageDefined(const String &name) const
return true if an Image with the specified name exists.
Definition: CEGUIImageset.h:156
float d_horzScaling
current horizontal scaling factor.
Definition: CEGUIImageset.h:570
String d_name
Holds the name of this imageset.
Definition: CEGUIImageset.h:563
static const String & getDefaultResourceGroup()
Returns the default resource group currently set for Imagesets.
Definition: CEGUIImageset.h:522
bool d_autoScale
true when auto-scaling is enabled.
Definition: CEGUIImageset.h:569
float getImageOffsetY(const String &name) const
return the y rendering offset for the named image.
Definition: CEGUIImageset.h:282
String d_textureFilename
String holding the name of the texture filename (if any).
Definition: CEGUIImageset.h:566
bool isAutoScaled(void) const
Return whether this Imageset is auto-scaled.
Definition: CEGUIImageset.h:430
uint getImageCount(void) const
return number of images defined for this Imageset
Definition: CEGUIImageset.h:143
float d_vertScaling
current vertical scaling factor.
Definition: CEGUIImageset.h:571
ImageRegistry d_images
Registry of Image objects for the images defined for this Imageset.
Definition: CEGUIImageset.h:564
Texture * getTexture(void) const
return Texture object for this Imageset
Definition: CEGUIImageset.h:123
Class used to create XML Document.
Definition: CEGUIXMLSerializer.h:86
Class encapsulating operations on a Rectangle.
Definition: CEGUIRect.h:44
String class used within the GUI system.
Definition: CEGUIString.h:57