The base class for ImageBuffer. More...
#include <ImageBufferBase.hpp>
Public Member Functions | |
const PixelData & | getPixelData () const |
Get the format of pixels in the buffer. More... | |
const unsigned int | getWidth () const |
Get the width of the ImageBuffer in pixels. More... | |
const unsigned int | getHeight () const |
Get the height of the ImageBuffer in pixels. More... | |
const unsigned int | getTileExtent () const |
Get the size of a side of underlying Tiles in pixels. More... | |
const unsigned int | getNumOfTilesHoriz () const |
Get the number of tiles in a grid in the horizontal dimension. More... | |
const unsigned int | getNumOfTilesVert () const |
Get the number of tiles in a grid in the vertical dimension. More... | |
const long | newStamp () |
Get a new stamp for use with Tile::setStamp() function. More... | |
Protected Member Functions | |
ImageBufferBase () | |
Protected constructor. More... | |
Protected Attributes | |
PixelData | m_pixelData |
unsigned int | m_width |
unsigned int | m_height |
unsigned int | m_tileExtent |
unsigned int | m_numOfTilesHorizontal |
unsigned int | m_numOfTilesVertical |
long | m_stamp |
The base class for ImageBuffer.
Stores the basic information about the format of pixels in the buffer in the PixelData structure. ImageBuffer reuses this structure internally.
The reason for this is to allow passing of ImageBuffer between functions without using templates.
It is possible to access the PixelData using the getPixelData().
|
protected |
Protected constructor.
Disables the possibility of creating ImageBufferBase objects.
const unsigned int FotoSHOCKcore::ImageBufferBase::getHeight | ( | ) | const |
Get the height of the ImageBuffer in pixels.
const unsigned int FotoSHOCKcore::ImageBufferBase::getNumOfTilesHoriz | ( | ) | const |
Get the number of tiles in a grid in the horizontal dimension.
const unsigned int FotoSHOCKcore::ImageBufferBase::getNumOfTilesVert | ( | ) | const |
Get the number of tiles in a grid in the vertical dimension.
const PixelData & FotoSHOCKcore::ImageBufferBase::getPixelData | ( | ) | const |
Get the format of pixels in the buffer.
These data are only valid if the ImageBufferBase is used as a pointer to the existing ImageBuffer.
const unsigned int FotoSHOCKcore::ImageBufferBase::getTileExtent | ( | ) | const |
Get the size of a side of underlying Tiles in pixels.
const unsigned int FotoSHOCKcore::ImageBufferBase::getWidth | ( | ) | const |
Get the width of the ImageBuffer in pixels.
const long int FotoSHOCKcore::ImageBufferBase::newStamp | ( | ) |
Get a new stamp for use with Tile::setStamp() function.
The stamp can be used as a unique identifier within a buffer.
The uniqueness is not guaranteed between buffers. In fact the newStamp() function will return the same numbers in all buffers