#include <image.h>
Inherited by mxgui::basic_image< T >, mxgui::ResourceImage, and mxgui::TgaImage.
List of all members.
Detailed Description
template<typename T>
class mxgui::basic_image_base< T >
Base class from which image classes derive. This class is pure virtual and as such it is not meant to be directly instantiated.
Constructor & Destructor Documentation
Construct an Image
- Parameters:
-
| height | the image's height |
| width | the image's width |
Member Function Documentation
template<typename T >
template<typename U >
Draw part of an image on a surface
- Parameters:
-
| surface | an object that provides pixel iterators. |
| p | point of the upper left corner where the image will be drawn. Negative coordinates are allowed, as long as the clipped view has positive or zero coordinates |
| a | Upper left corner of clipping rectangle |
| b | Lower right corner of clipping rectangle |
template<typename T >
template<typename U >
Draw an image on a surface
- Parameters:
-
| surface | an object that provides pixel iterators. |
| p | point of the upper left corner where the image will be drawn |
Image classes that derive form this class can be divided in two kinds: those that make the whole image available as const T* pointer, and those that load only a small portion of the image at a time in order to minimize RAM usage. This member function can be used to differentiate between the two: if the returned pointer is not NULL then it is a valid pointer to the whole image that can be used to draw the whole image in an optimized way. Otherwise the only way to get image data is to use getScanLine() to retrieve the image one scanline at a time. Note that getScanLine() always work for any kind of image.
- Returns:
- a const pointer to the image's data if available, or NULL otherwise
Reimplemented in mxgui::basic_image< T >.
- Returns:
- the image's height
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 in mxgui::ResourceImage, and mxgui::TgaImage.
- Returns:
- the image's width
The documentation for this class was generated from the following file: