#include <spImageBufferContainer.hpp>
Public Member Functions | |
virtual | ~ImageBufferContainer () |
bool | setFormat (const EPixelFormats Format) |
Converts the pixel format and returns true if something has changed. | |
void | setSize (const dim::size2di &Size) |
Resizes the image buffer. | |
bool | setDepth (u32 Depth) |
Resizes the image buffer for the depth and returns true on success. | |
void | invertColors () |
Inverts all pixel colors. | |
void | flipColors () |
Flips all pixel colors (from RGB to BGR). | |
void | flipImageHorizontal () |
Flips the image on X-axis. | |
void | flipImageVertical () |
Flips the image on Y-axis. | |
void | turnImage (const EImageTurnDegrees Degree) |
Turns the image in 90, 180 or 270 degrees. | |
void | grayToAlpha () |
Converts the gray values to alpha channel. Among others this is used for textured font. | |
u32 | getDataTypeSize () const |
Returns the data type size (in bytes). For unsigned bytes it's 1 and for floats it's 4. | |
void * | getBuffer () |
Returns pointer to the image buffer stored in the RAM. This can be a UByte or Float pointer. | |
const void * | getBuffer () const |
bool | appendImageBuffer (const ImageBuffer *AdditionalBuffer, bool isAppendBottom=true) |
virtual void | createBuffer (const void *InitBuffer=0) |
virtual void | deleteBuffer () |
Deletes the image buffer. | |
Protected Member Functions | |
ImageBufferContainer (const EImageBufferTypes Type) | |
ImageBufferContainer (const EImageBufferTypes Type, const EPixelFormats Format, const dim::size2di &Size, u32 Depth=1, const void *InitBuffer=0) | |
Protected Attributes | |
T * | Buffer_ |
virtual sp::video::ImageBufferContainer< T, DefVal >::~ImageBufferContainer | ( | ) | [inline, virtual] |
sp::video::ImageBufferContainer< T, DefVal >::ImageBufferContainer | ( | const EImageBufferTypes | Type | ) | [inline, protected] |
sp::video::ImageBufferContainer< T, DefVal >::ImageBufferContainer | ( | const EImageBufferTypes | Type, | |
const EPixelFormats | Format, | |||
const dim::size2di & | Size, | |||
u32 | Depth = 1 , |
|||
const void * | InitBuffer = 0 | |||
) | [inline, protected] |
bool sp::video::ImageBufferContainer< T, DefVal >::appendImageBuffer | ( | const ImageBuffer * | AdditionalBuffer, | |
bool | isAppendBottom = true | |||
) | [inline, virtual] |
Appends the given image buffer to this one. The additional image buffer will be resized to fit into this image buffer.
[in] | NewFrame | Pointer to the additional image buffer object which is to be appended. |
[in] | isAppendBottom | Specifies whether the additional image buffer is to be appended at the bottom or not. If not it will be inserted into the image buffer so that it looks like the image will be appended at the right. This is slower than appending it at the end of the buffer! By default true. |
Implements sp::video::ImageBuffer.
virtual void sp::video::ImageBufferContainer< T, DefVal >::createBuffer | ( | const void * | InitBuffer = 0 |
) | [inline, virtual] |
Creates the buffer and deletes the old one.
[in] | InitBuffer | Pointer to the buffer which is to be compied. This must point to a memory buffer with the same size as the image buffer. Otherwise it must be a null pointer. By default null. |
Implements sp::video::ImageBuffer.
virtual void sp::video::ImageBufferContainer< T, DefVal >::deleteBuffer | ( | ) | [inline, virtual] |
Deletes the image buffer.
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::flipColors | ( | ) | [inline, virtual] |
Flips all pixel colors (from RGB to BGR).
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::flipImageHorizontal | ( | ) | [inline, virtual] |
Flips the image on X-axis.
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::flipImageVertical | ( | ) | [inline, virtual] |
Flips the image on Y-axis.
Implements sp::video::ImageBuffer.
void* sp::video::ImageBufferContainer< T, DefVal >::getBuffer | ( | ) | [inline, virtual] |
Returns pointer to the image buffer stored in the RAM. This can be a UByte or Float pointer.
Implements sp::video::ImageBuffer.
const void* sp::video::ImageBufferContainer< T, DefVal >::getBuffer | ( | ) | const [inline, virtual] |
Implements sp::video::ImageBuffer.
u32 sp::video::ImageBufferContainer< T, DefVal >::getDataTypeSize | ( | ) | const [inline, virtual] |
Returns the data type size (in bytes). For unsigned bytes it's 1 and for floats it's 4.
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::grayToAlpha | ( | ) | [inline, virtual] |
Converts the gray values to alpha channel. Among others this is used for textured font.
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::invertColors | ( | ) | [inline, virtual] |
Inverts all pixel colors.
Implements sp::video::ImageBuffer.
bool sp::video::ImageBufferContainer< T, DefVal >::setDepth | ( | u32 | Depth | ) | [inline, virtual] |
Resizes the image buffer for the depth and returns true on success.
Implements sp::video::ImageBuffer.
bool sp::video::ImageBufferContainer< T, DefVal >::setFormat | ( | const EPixelFormats | Format | ) | [inline, virtual] |
Converts the pixel format and returns true if something has changed.
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::setSize | ( | const dim::size2di & | Size | ) | [inline, virtual] |
Resizes the image buffer.
Implements sp::video::ImageBuffer.
void sp::video::ImageBufferContainer< T, DefVal >::turnImage | ( | const EImageTurnDegrees | Degree | ) | [inline, virtual] |
Turns the image in 90, 180 or 270 degrees.
Implements sp::video::ImageBuffer.
T* sp::video::ImageBufferContainer< T, DefVal >::Buffer_ [protected] |