FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FotoSHOCKcore::ImageBufferBase Class Reference

The base class for ImageBuffer. More...

#include <ImageBufferBase.hpp>

Inheritance diagram for FotoSHOCKcore::ImageBufferBase:
FotoSHOCKcore::ImageBuffer< PixelFormat >

Public Member Functions

const PixelDatagetPixelData () 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
 

Detailed Description

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().

Constructor & Destructor Documentation

FotoSHOCKcore::ImageBufferBase::ImageBufferBase ( )
protected

Protected constructor.

Disables the possibility of creating ImageBufferBase objects.

Member Function Documentation

const unsigned int FotoSHOCKcore::ImageBufferBase::getHeight ( ) const

Get the height of the ImageBuffer in pixels.

Returns
height of the buffer
const unsigned int FotoSHOCKcore::ImageBufferBase::getNumOfTilesHoriz ( ) const

Get the number of tiles in a grid in the horizontal dimension.

Returns
the number of tiles
const unsigned int FotoSHOCKcore::ImageBufferBase::getNumOfTilesVert ( ) const

Get the number of tiles in a grid in the vertical dimension.

Returns
the number of tiles
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.

Returns
the size of a side of a Tile
const unsigned int FotoSHOCKcore::ImageBufferBase::getWidth ( ) const

Get the width of the ImageBuffer in pixels.

Returns
width of the buffer
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

Returns
a stamp

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