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]


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

Copy constructor

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


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.

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()
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]
true if image is open
void mxgui::ResourceImage::open ( const char *  name  ) 

Open a file

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

Operator =

rhs instance to copy from
reference to *this

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