Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUI::Image Class Reference

Class that represents a single Image of an Imageset. More...

#include <CEGUIImage.h>

Collaboration diagram for CEGUI::Image:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Size getSize (void) const
 Return a Size object containing the dimensions of the Image.
float getWidth (void) const
 Return the pixel width of the image.
float getHeight (void) const
 Return the pixel height of the image.
Point getOffsets (void) const
 Return a Point object that contains the offset applied when rendering this Image.
float getOffsetX (void) const
 Return the X rendering offset.
float getOffsetY (void) const
 Return the Y rendering offset.
const StringgetName (void) const
 Return the name of this Image object.
const StringgetImagesetName (void) const
 Return the name of the Imageset that contains this Image.
void draw (const Vector3 &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.
void draw (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
 Queue the image to be drawn.
void draw (const Vector3 &position, const Size &size, const Rect &clip_rect, const ColourRect &colours, QuadSplitMode quad_split_mode=TopLeftToBottomRight) const
 Queue the image to be drawn.
void draw (const Vector3 &position, const Rect &clip_rect, const ColourRect &colours, QuadSplitMode quad_split_mode=TopLeftToBottomRight) const
 Queue the image to be drawn.
void draw (const Vector3 &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.
void draw (const Rect &dest_rect, float z, const Rect &clip_rect, const ColourRect &colours, QuadSplitMode quad_split_mode=TopLeftToBottomRight) const
 Queue the image to be drawn.
 Image (void)
 Default constructor (only used by std::map).
 Image (const Imageset *owner, const String &name, const Rect &area, const Point &render_offset, float horzScaling=1.0f, float vertScaling=1.0f)
 Constructor for Image objects. This is not normally used directly by client code, use the Imageset interface instead.
 Image (const Image &image)
 Copy constructor.
 ~Image (void)
 Destructor for Image objects.

Friends

class std::map<String, Image>
struct std::pair<const String, Image>
class Imageset

Detailed Description

Class that represents a single Image of an Imageset.

Definition at line 51 of file CEGUIImage.h.


Constructor & Destructor Documentation

CEGUI::Image::Image void   )  [inline]
 

Default constructor (only used by std::map).

Definition at line 372 of file CEGUIImage.h.

CEGUI::Image::Image const Imageset owner,
const String name,
const Rect area,
const Point render_offset,
float  horzScaling = 1.0f,
float  vertScaling = 1.0f
 

Constructor for Image objects. This is not normally used directly by client code, use the Imageset interface instead.

Parameters:
owner Pointer to a Imageset object that owns this Image. This must not be NULL.
name String object describing the name of the image being created.
area Rect object describing an area that will be associated with this image.
render_offset Point object that describes the offset to be applied when rendering this image.
horzScaling float value indicating the initial horizontal scaling to be applied to this image.
vertScaling float value indicating the initial vertical scaling to be applied to this image.
Exceptions:
NullObjectException Thrown if owner was NULL.

Definition at line 42 of file CEGUIImage.cpp.

References CEGUI::Point, and CEGUI::utf8.

CEGUI::Image::Image const Image image  ) 
 

Copy constructor.

Definition at line 63 of file CEGUIImage.cpp.

CEGUI::Image::~Image void   ) 
 

Destructor for Image objects.

Definition at line 77 of file CEGUIImage.cpp.


Member Function Documentation

void CEGUI::Image::draw const Rect dest_rect,
float  z,
const Rect clip_rect,
const ColourRect colours,
QuadSplitMode  quad_split_mode = TopLeftToBottomRight
const
 

Queue the image to be drawn.

Note:
The final position of the Image will be adjusted by the offset values defined for this Image object. If absolute positioning is essential then these values should be taken into account prior to calling the draw() methods. However, by doing this you take away the ability of the Imageset designer to adjust the alignment and positioning of Images, therefore your component is far less useful since it requires code changes to modify image positioning that could have been handled from a data file.
Parameters:
dest_rect Rect object defining the area on-screen where the Image is to be drawn. The Image will be scaled to fit the area as required.
z Z-order position for the image. Positions increase "into the screen", so 0.0f is at the top of the z-order.
clip_rect Rect object that defines an on-screen area that the Image will be clipped to when drawing.
colours ColourRect object that describes the colour values to use for each corner of the Image.
quad_split_mode One of the QuadSplitMode values specifying the way quads are split into triangles
Returns:
Nothing

Definition at line 105 of file CEGUIImage.cpp.

References CEGUI::Imageset::draw(), and CEGUI::Rect::offset().

void CEGUI::Image::draw const Vector3 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 [inline]
 

Queue the image to be drawn.

Note:
The final position of the Image will be adjusted by the offset values defined for this Image object. If absolute positioning is essential then these values should be taken into account prior to calling the draw() methods. However, by doing this you take away the ability of the Imageset designer to adjust the alignment and positioning of Images, therefore your component is far less useful since it requires code changes to modify image positioning that could have been handled from a data file.
Parameters:
position Vector3 object containing the location where the Image is to be drawn
clip_rect Rect object that defines an on-screen area that the Image will be clipped to when drawing.
top_left_colour Colour (as 0xAARRGGBB value) to be applied to the top-left corner of the Image.
top_right_colour Colour (as 0xAARRGGBB value) to be applied to the top-right corner of the Image.
bottom_left_colour Colour (as 0xAARRGGBB value) to be applied to the bottom-left corner of the Image.
bottom_right_colour Colour (as 0xAARRGGBB value) to be applied to the bottom-right corner of the Image.
quad_split_mode One of the QuadSplitMode values specifying the way quads are split into triangles
Returns:
Nothing

Definition at line 323 of file CEGUIImage.h.

References CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, and CEGUI::Vector3::d_z.

void CEGUI::Image::draw const Vector3 position,
const Rect clip_rect,
const ColourRect colours,
QuadSplitMode  quad_split_mode = TopLeftToBottomRight
const [inline]
 

Queue the image to be drawn.

Note:
The final position of the Image will be adjusted by the offset values defined for this Image object. If absolute positioning is essential then these values should be taken into account prior to calling the draw() methods. However, by doing this you take away the ability of the Imageset designer to adjust the alignment and positioning of Images, therefore your component is far less useful since it requires code changes to modify image positioning that could have been handled from a data file.
Parameters:
position Vector3 object containing the location where the Image is to be drawn
Note:
The image will be drawn at it's internally defined size.
Parameters:
clip_rect Rect object that defines an on-screen area that the Image will be clipped to when drawing.
colours ColourRect object that describes the colour values to use for each corner of the Image.
quad_split_mode One of the QuadSplitMode values specifying the way quads are split into triangles
Returns:
Nothing

Definition at line 283 of file CEGUIImage.h.

References CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, and CEGUI::Vector3::d_z.

void CEGUI::Image::draw const Vector3 position,
const Size size,
const Rect clip_rect,
const ColourRect colours,
QuadSplitMode  quad_split_mode = TopLeftToBottomRight
const [inline]
 

Queue the image to be drawn.

Note:
The final position of the Image will be adjusted by the offset values defined for this Image object. If absolute positioning is essential then these values should be taken into account prior to calling the draw() methods. However, by doing this you take away the ability of the Imageset designer to adjust the alignment and positioning of Images, therefore your component is far less useful since it requires code changes to modify image positioning that could have been handled from a data file.
Parameters:
position Vector3 object containing the location where the Image is to be drawn
size Size object describing the size that the Image is to be drawn at.
clip_rect Rect object that defines an on-screen area that the Image will be clipped to when drawing.
colours ColourRect object that describes the colour values to use for each corner of the Image.
quad_split_mode One of the QuadSplitMode values specifying the way quads are split into triangles
Returns:
Nothing

Definition at line 249 of file CEGUIImage.h.

References CEGUI::Size::d_height, CEGUI::Size::d_width, CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, and CEGUI::Vector3::d_z.

void CEGUI::Image::draw 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 [inline]
 

Queue the image to be drawn.

Note:
The final position of the Image will be adjusted by the offset values defined for this Image object. If absolute positioning is essential then these values should be taken into account prior to calling the draw() methods. However, by doing this you take away the ability of the Imageset designer to adjust the alignment and positioning of Images, therefore your component is far less useful since it requires code changes to modify image positioning that could have been handled from a data file.
Parameters:
dest_rect Rect object defining the area on-screen where the Image is to be drawn. The Image will be scaled to fit the area as required.
z Z-order position for the image. Positions increase "into the screen", so 0.0f is at the top of the z-order.
clip_rect Rect object that defines an on-screen area that the Image will be clipped to when drawing.
top_left_colour Colour (as 0xAARRGGBB value) to be applied to the top-left corner of the Image.
top_right_colour Colour (as 0xAARRGGBB value) to be applied to the top-right corner of the Image.
bottom_left_colour Colour (as 0xAARRGGBB value) to be applied to the bottom-left corner of the Image.
bottom_right_colour Colour (as 0xAARRGGBB value) to be applied to the bottom-right corner of the Image.
quad_split_mode One of the QuadSplitMode values specifying the way quads are split into triangles
Returns:
Nothing

Definition at line 215 of file CEGUIImage.h.

void CEGUI::Image::draw const Vector3 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 [inline]
 

Queue the image to be drawn.

Note:
The final position of the Image will be adjusted by the offset values defined for this Image object. If absolute positioning is essential then these values should be taken into account prior to calling the draw() methods. However, by doing this you take away the ability of the Imageset designer to adjust the alignment and positioning of Images, therefore your component is far less useful since it requires code changes to modify image positioning that could have been handled from a data file.
Parameters:
position Vector3 object containing the location where the Image is to be drawn
size Size object describing the size that the Image is to be drawn at.
clip_rect Rect object that defines an on-screen area that the Image will be clipped to when drawing.
top_left_colour Colour (as 0xAARRGGBB value) to be applied to the top-left corner of the Image.
top_right_colour Colour (as 0xAARRGGBB value) to be applied to the top-right corner of the Image.
bottom_left_colour Colour (as 0xAARRGGBB value) to be applied to the bottom-left corner of the Image.
bottom_right_colour Colour (as 0xAARRGGBB value) to be applied to the bottom-right corner of the Image.
quad_split_mode One of the QuadSplitMode values specifying the way quads are split into triangles
Returns:
Nothing

Definition at line 171 of file CEGUIImage.h.

References CEGUI::Size::d_height, CEGUI::Size::d_width, CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, and CEGUI::Vector3::d_z.

Referenced by CEGUI::MouseCursor::draw(), CEGUI::ListboxTextItem::draw(), CEGUI::RenderableImage::draw_impl(), CEGUI::RenderableFrame::draw_impl(), CEGUI::Static::drawSelf(), and CEGUI::MultiLineEditbox::renderTextLines().

float CEGUI::Image::getHeight void   )  const [inline]
 

Return the pixel height of the image.

Returns:
Height of this Image in pixels

Definition at line 81 of file CEGUIImage.h.

Referenced by CEGUI::RenderableFrame::draw_impl(), CEGUI::Static::setFrameImages(), and CEGUI::Static::setImageForFrameLocation().

const String & CEGUI::Image::getImagesetName void   )  const
 

Return the name of the Imageset that contains this Image.

Returns:
String object containing the name of the Imageset which this Image is a part of.

Definition at line 129 of file CEGUIImage.cpp.

References CEGUI::Imageset::getName().

Referenced by CEGUI::PropertyHelper::imageToString().

const String & CEGUI::Image::getName void   )  const
 

Return the name of this Image object.

Returns:
String object containing the name of this Image

Definition at line 120 of file CEGUIImage.cpp.

Referenced by CEGUI::PropertyHelper::imageToString().

Point CEGUI::Image::getOffsets void   )  const [inline]
 

Return a Point object that contains the offset applied when rendering this Image.

Returns:
Point object containing the offsets applied when rendering this Image

Definition at line 91 of file CEGUIImage.h.

References CEGUI::Point.

float CEGUI::Image::getOffsetX void   )  const [inline]
 

Return the X rendering offset.

Returns:
X rendering offset. This is the number of pixels that the image is offset by when rendering at any given location.

Definition at line 101 of file CEGUIImage.h.

Referenced by CEGUI::RenderableFrame::draw_impl().

float CEGUI::Image::getOffsetY void   )  const [inline]
 

Return the Y rendering offset.

Returns:
Y rendering offset. This is the number of pixels that the image is offset by when rendering at any given location.

Definition at line 111 of file CEGUIImage.h.

Referenced by CEGUI::RenderableFrame::draw_impl().

Size CEGUI::Image::getSize void   )  const [inline]
 

Return a Size object containing the dimensions of the Image.

Returns:
Size object holding the width and height of the Image.

Definition at line 61 of file CEGUIImage.h.

Referenced by CEGUI::RenderableImage::draw_impl().

float CEGUI::Image::getWidth void   )  const [inline]
 

Return the pixel width of the image.

Returns:
Width of this Image in pixels.

Definition at line 71 of file CEGUIImage.h.

Referenced by CEGUI::RenderableFrame::draw_impl(), CEGUI::Static::setFrameImages(), and CEGUI::Static::setImageForFrameLocation().


Friends And Related Function Documentation

friend class Imageset [friend]
 

Definition at line 421 of file CEGUIImage.h.

friend class std::map<String, Image> [friend]
 

Definition at line 361 of file CEGUIImage.h.

friend struct std::pair<const String, Image> [friend]
 

Definition at line 362 of file CEGUIImage.h.


The documentation for this class was generated from the following files:
Generated on Wed Feb 16 12:41:10 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1