Contains information about an image loaded by CGUIImageLoader. More...
#include <GUIImageData.h>
Public Types | |
enum | DataType_t { DT_BITMAP , DT_VECTOR } |
enum | MemoryType_t { MT_MANAGED_INTERNAL , MT_MANAGED_EXTERNAL , MT_ROM } |
Public Member Functions | |
CGUIImageData () | |
~CGUIImageData () | |
void | DeleteData () |
eC_UByte | GetBytePerPixel () const |
eC_UByte * | GetData () const |
CSVGShape * | GetDataSVG () |
DataType_t | GetDataType () const |
eC_UByte | GetFiller () const |
eC_UInt | GetHeight () const |
eC_UInt | GetImageSize () const |
CGUICommonEnums::ImageType_t | GetImageType () const |
MemoryType_t | GetMemoryType () const |
eC_UInt | GetWidth () const |
eC_Bool | HasAlpha () const |
eC_Bool | HasSourceAlpha () const |
CGUIImageData & | operator= (const CGUIImageData &kSource) |
void | SetData (eC_UByte *pubData) |
void | SetDataSVG (CSVGShape *pkSVGShapes) |
void | SetDataType (const DataType_t &eType) |
void | SetFiller (const eC_UByte &ubFillerByte) |
void | SetHeight (const eC_UInt &uiHeight) |
void | SetImageType (const CGUICommonEnums::ImageType_t &eImageType) |
void | SetMemoryType (const MemoryType_t &eType) |
void | SetSourceAlpha (const eC_Bool &bSourceAlpha) |
void | SetWidth (const eC_UInt &uiWidth) |
Contains information about an image loaded by CGUIImageLoader.
Typical use case for this class is that a graphics wrapper creates an object of this class, sets some attributes to make sure the image uses the correct format etc., then passes it to the image loader which hands it over to the individual image decoders that fill the data section with the decoded image data.
CGUIImageData::CGUIImageData | ( | ) |
CGUIImageData constructor
CGUIImageData::~CGUIImageData | ( | ) |
CGUIImageData destructor
void CGUIImageData::DeleteData | ( | ) |
Deletes the image data array.
eC_UByte CGUIImageData::GetBytePerPixel | ( | ) | const |
eC_UByte * CGUIImageData::GetData | ( | ) | const |
CSVGShape * CGUIImageData::GetDataSVG | ( | ) |
Gets the data pointer of an SVG-image.
DataType_t CGUIImageData::GetDataType | ( | ) | const |
eC_UByte CGUIImageData::GetFiller | ( | ) | const |
eC_UInt CGUIImageData::GetHeight | ( | ) | const |
eC_UInt CGUIImageData::GetImageSize | ( | ) | const |
Returns the size (in bytes) of this image. Width, height and bits per pixel must have been set correctly before.
CGUICommonEnums::ImageType_t CGUIImageData::GetImageType | ( | ) | const |
MemoryType_t CGUIImageData::GetMemoryType | ( | ) | const |
eC_UInt CGUIImageData::GetWidth | ( | ) | const |
eC_Bool CGUIImageData::HasAlpha | ( | ) | const |
Returns whether the image has alpha channel or not.
eC_Bool CGUIImageData::HasSourceAlpha | ( | ) | const |
Return whether the original image had an alpha-channel
CGUIImageData & CGUIImageData::operator= | ( | const CGUIImageData & | kSource | ) |
Operator= method. This does a flat copy of the given source CGUIImageData object, which means that both GUIImageData objects will then reference the SAME DATA in memory.
kSource | Source object to be copied. |
void CGUIImageData::SetData | ( | eC_UByte * | pubData | ) |
Sets the data pointer of the image. Should only be called by an image decoder.
*pubData | Pointer to memory to be used for storing a decoded image. |
void CGUIImageData::SetDataSVG | ( | CSVGShape * | pkSVGShapes | ) |
Sets the data-pointer of an SVG-image. Should only be called by an image.
pkSVGShapes | Pointer to std::vector<CSVGShape>. |
void CGUIImageData::SetDataType | ( | const DataType_t & | eType | ) |
Sets the type of data (bitmap or vector)
eType | data-type |
void CGUIImageData::SetFiller | ( | const eC_UByte & | ubFillerByte | ) |
Sets the 'filler' value. It is typically used by decoders that load non-alpha images but store it in an alpha-enabled format. This 'filler' is then used as the alpha value. This method should be called before CGUIImageDecoder::LoadImg().
ubFillerByte | Value used for the alpha filler. |
void CGUIImageData::SetHeight | ( | const eC_UInt & | uiHeight | ) |
Sets the height of the image. Should only be called by an image decoder.
uiHeight | Height of the image. |
void CGUIImageData::SetImageType | ( | const CGUICommonEnums::ImageType_t & | eImageType | ) |
Sets the image format type.
eImageType | The format type. |
void CGUIImageData::SetMemoryType | ( | const MemoryType_t & | eType | ) |
Sets the memory-type for the image-data
eType | memory-type |
void CGUIImageData::SetSourceAlpha | ( | const eC_Bool & | bSourceAlpha | ) |
Sets member to true if original image has alpha-channel
bSourceAlpha |
void CGUIImageData::SetWidth | ( | const eC_UInt & | uiWidth | ) |
Sets the width of the image. Should only be called by an image decoder.
uiWidth | Width of the image. |