30 #ifndef _CEGUIImage_h_
31 #define _CEGUIImage_h_
33 #include "CEGUIBase.h"
34 #include "CEGUIString.h"
35 #include "CEGUIRect.h"
36 #include "CEGUIColourRect.h"
37 #include "CEGUIVector.h"
38 #include "CEGUISize.h"
39 #include "CEGUIRenderer.h"
40 #include "CEGUIXMLSerializer.h"
45 # pragma warning(push)
46 # pragma warning(disable : 4251)
77 float getWidth(
void)
const {
return d_scaledWidth;}
87 float getHeight(
void)
const {
return d_scaledHeight;}
127 const String& getName(
void)
const;
137 const String& getImagesetName(
void)
const;
156 const Rect& getSourceTextureArea(
void)
const;
205 const Rect* clip_rect,
206 const colour& top_left_colour = 0xFFFFFFFF,
207 const colour& top_right_colour = 0xFFFFFFFF,
208 const colour& bottom_left_colour = 0xFFFFFFFF,
209 const colour& bottom_right_colour = 0xFFFFFFFF,
212 draw(buffer,
Rect(position.d_x, position.d_y,
213 position.d_x + size.d_width,
214 position.d_y + size.d_height),
216 ColourRect(top_left_colour, top_right_colour, bottom_left_colour,
217 bottom_right_colour),
266 const Rect* clip_rect,
267 const colour& top_left_colour = 0xFFFFFFFF,
268 const colour& top_right_colour = 0xFFFFFFFF,
269 const colour& bottom_left_colour = 0xFFFFFFFF,
270 const colour& bottom_right_colour = 0xFFFFFFFF,
273 draw(buffer, dest_rect, clip_rect,
275 bottom_left_colour, bottom_right_colour),
321 draw(buffer,
Rect(position.d_x, position.d_y,
322 position.d_x + size.d_width,
323 position.d_y + size.d_height),
324 clip_rect, colours, quad_split_mode);
369 draw(buffer,
Rect(position.d_x, position.d_y,
370 position.d_x + getWidth(),
371 position.d_y + getHeight()),
372 clip_rect, colours, quad_split_mode);
419 const Rect* clip_rect,
420 const colour& top_left_colour = 0xFFFFFFFF,
421 const colour& top_right_colour = 0xFFFFFFFF,
422 const colour& bottom_left_colour = 0xFFFFFFFF,
423 const colour& bottom_right_colour = 0xFFFFFFFF,
426 draw(buffer,
Rect(position.d_x, position.d_y,
427 position.d_x + getWidth(),
428 position.d_y + getHeight()),
431 bottom_left_colour, bottom_right_colour),
490 friend struct std::pair<const String, Image>;
527 Image(
const Imageset* owner,
const String& name,
const Rect& area,
const Point& render_offset,
float horzScaling = 1.0f,
float vertScaling = 1.0f);
565 void setHorzScaling(
float factor);
578 void setVertScaling(
float factor);
590 float d_scaledHeight;
591 Point d_scaledOffset;
597 #if defined(_MSC_VER)
598 # pragma warning(pop)
601 #endif // end of guard _CEGUIImage_h_
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
float getOffsetY(void) const
Return the Y rendering offset.
Definition: CEGUIImage.h:117
Class that represents a single Image of an Imageset.
Definition: CEGUIImage.h:57
Diagonal split goes from top-left to bottom-right.
Definition: CEGUIRenderer.h:47
void draw(GeometryBuffer &buffer, const Vector2 &position, 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
Queue the image to be drawn.
Definition: CEGUIImage.h:418
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
Size getSize(void) const
Return a Size object containing the dimensions of the Image.
Definition: CEGUIImage.h:67
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
Point getOffsets(void) const
Return a Point object that contains the offset applied when rendering this Image. ...
Definition: CEGUIImage.h:97
QuadSplitMode
Enumerated type that contains the valid diagonal-mode that specify how a quad is split into triangles...
Definition: CEGUIRenderer.h:44
const Imageset * getImageset(void) const
Return the parent Imageset object that contains this Image.
Definition: CEGUIImage.h:146
void draw(GeometryBuffer &buffer, const Vector2 &position, const Size &size, const Rect *clip_rect, const ColourRect &colours, QuadSplitMode quad_split_mode=TopLeftToBottomRight) const
Queue the image to be drawn.
Definition: CEGUIImage.h:317
float getOffsetX(void) const
Return the X rendering offset.
Definition: CEGUIImage.h:107
float getHeight(void) const
Return the pixel height of the image.
Definition: CEGUIImage.h:87
void draw(GeometryBuffer &buffer, 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
Queue the image to be drawn.
Definition: CEGUIImage.h:265
Class used to create XML Document.
Definition: CEGUIXMLSerializer.h:86
float getWidth(void) const
Return the pixel width of the image.
Definition: CEGUIImage.h:77
Class encapsulating operations on a Rectangle.
Definition: CEGUIRect.h:44
String class used within the GUI system.
Definition: CEGUIString.h:57
void draw(GeometryBuffer &buffer, const Vector2 &position, const Rect *clip_rect, const ColourRect &colours, QuadSplitMode quad_split_mode=TopLeftToBottomRight) const
Queue the image to be drawn.
Definition: CEGUIImage.h:365
void draw(GeometryBuffer &buffer, const Vector2 &position, const Size &size, 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
Queue the image to be drawn.
Definition: CEGUIImage.h:204