Public Member Functions

mxgui::ResourceImage Class Reference
[Mxgui level 1]

#include <resource_image.h>

Inherits mxgui::basic_image_base< unsigned short >.

List of all members.

Public Member Functions

 ResourceImage ()
 ResourceImage (const char *name)
 ResourceImage (const ResourceImage &rhs)
ResourceImageoperator= (const ResourceImage &)
void open (const char *name)
void close ()
bool isOpen () const
virtual bool getScanLine (mxgui::Point p, mxgui::Color colors[], unsigned short length) const
virtual ~ResourceImage ()

Detailed Description

This is a class for handling images stored in the ResourceFs filesystem, and is the primary reason why ResourceFs was designed.


Constructor & Destructor Documentation

mxgui::ResourceImage::ResourceImage (  )  [inline]

Default constructor

mxgui::ResourceImage::ResourceImage ( const char *  name  )  [inline, explicit]

Constructor.

Parameters:
name name of image file inside the resource filesystem
mxgui::ResourceImage::ResourceImage ( const ResourceImage rhs  ) 

Copy constructor

Parameters:
rhs instance to copy from
virtual mxgui::ResourceImage::~ResourceImage (  )  [inline, virtual]

Desctructor


Member Function Documentation

void mxgui::ResourceImage::close (  ) 

Close image file

bool mxgui::ResourceImage::getScanLine ( mxgui::Point  p,
mxgui::Color  colors[],
unsigned short  length 
) const [virtual]

Get pixels from tha image. This member function can be used to get up to a full horizontal line of pixels from an image.

Parameters:
p Start point, within <0,0> and <getWidth()-1,getHeight()-1>
colors pixel data is returned here. Array size must be equal to the length parameter
length number of pixel to retrieve from the starting point. start.x()+length must be less or equal to getWidth()
Returns:
true if success. If false then it means the class does not represent a valid image, or a disk error occurred in case the image is stored on disk.

Reimplemented from mxgui::basic_image_base< T >.

bool mxgui::ResourceImage::isOpen (  )  const [inline]
Returns:
true if image is open
void mxgui::ResourceImage::open ( const char *  name  ) 

Open a file

Parameters:
name name of image file inside the resource filesystem
ResourceImage & mxgui::ResourceImage::operator= ( const ResourceImage rhs  ) 

Operator =

Parameters:
rhs instance to copy from
Returns:
reference to *this

The documentation for this class was generated from the following files: