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_