Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGUIImageData Class Reference

Contains information about an image loaded by CGUIImageLoader. More...

#include <GUIImageData.h>

Inheritance diagram for CGUIImageData:

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
 
CSVGShapeGetDataSVG ()
 
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
 
CGUIImageDataoperator= (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)
 

Detailed Description

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.

Member Enumeration Documentation

◆ DataType_t

the data-type

Enumerator
DT_BITMAP 

bitmap

DT_VECTOR 

vector

◆ MemoryType_t

type of memory-usage

Enumerator
MT_MANAGED_INTERNAL 

internally managed, will be automatically freed at end of lifetime

MT_MANAGED_EXTERNAL 

externally managed, will NOT be freed

MT_ROM 

ROM, will not be freed.

Constructor & Destructor Documentation

◆ CGUIImageData()

CGUIImageData::CGUIImageData ( )

CGUIImageData constructor

◆ ~CGUIImageData()

CGUIImageData::~CGUIImageData ( )

CGUIImageData destructor

Member Function Documentation

◆ DeleteData()

void CGUIImageData::DeleteData ( )

Deletes the image data array.

◆ GetBytePerPixel()

eC_UByte CGUIImageData::GetBytePerPixel ( ) const
Returns
The bit depth of the image.

◆ GetData()

eC_UByte * CGUIImageData::GetData ( ) const
Returns
Pointer to the decoded image data.

◆ GetDataSVG()

CSVGShape * CGUIImageData::GetDataSVG ( )

Gets the data pointer of an SVG-image.

Returns
Pointer to CSVGShapes.

◆ GetDataType()

DataType_t CGUIImageData::GetDataType ( ) const
Returns
type of stored data

◆ GetFiller()

eC_UByte CGUIImageData::GetFiller ( ) const
Returns
Value of the 'filler' byte. For an explanation of this value, see SetFiller().

◆ GetHeight()

eC_UInt CGUIImageData::GetHeight ( ) const
Returns
The height of the image.

◆ GetImageSize()

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.

Returns
Image size in bytes.

◆ GetImageType()

CGUICommonEnums::ImageType_t CGUIImageData::GetImageType ( ) const
Returns
The format type of the image.

◆ GetMemoryType()

MemoryType_t CGUIImageData::GetMemoryType ( ) const
Returns
type of used memory

◆ GetWidth()

eC_UInt CGUIImageData::GetWidth ( ) const
Returns
The width of the image.

◆ HasAlpha()

eC_Bool CGUIImageData::HasAlpha ( ) const

Returns whether the image has alpha channel or not.

Returns
True if the image has alpha data, otherwise False.

◆ HasSourceAlpha()

eC_Bool CGUIImageData::HasSourceAlpha ( ) const

Return whether the original image had an alpha-channel

Returns
true if original image has alpha-channel

◆ operator=()

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.

Parameters
kSourceSource object to be copied.
Returns
This instance.

◆ SetData()

void CGUIImageData::SetData ( eC_UByte *  pubData)

Sets the data pointer of the image. Should only be called by an image decoder.

Parameters
*pubDataPointer to memory to be used for storing a decoded image.

◆ SetDataSVG()

void CGUIImageData::SetDataSVG ( CSVGShape pkSVGShapes)

Sets the data-pointer of an SVG-image. Should only be called by an image.

Parameters
pkSVGShapesPointer to std::vector<CSVGShape>.

◆ SetDataType()

void CGUIImageData::SetDataType ( const DataType_t eType)

Sets the type of data (bitmap or vector)

Parameters
eTypedata-type

◆ SetFiller()

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

Parameters
ubFillerByteValue used for the alpha filler.

◆ SetHeight()

void CGUIImageData::SetHeight ( const eC_UInt &  uiHeight)

Sets the height of the image. Should only be called by an image decoder.

Parameters
uiHeightHeight of the image.

◆ SetImageType()

void CGUIImageData::SetImageType ( const CGUICommonEnums::ImageType_t eImageType)

Sets the image format type.

Parameters
eImageTypeThe format type.

◆ SetMemoryType()

void CGUIImageData::SetMemoryType ( const MemoryType_t eType)

Sets the memory-type for the image-data

Parameters
eTypememory-type

◆ SetSourceAlpha()

void CGUIImageData::SetSourceAlpha ( const eC_Bool &  bSourceAlpha)

Sets member to true if original image has alpha-channel

Parameters
bSourceAlpha

◆ SetWidth()

void CGUIImageData::SetWidth ( const eC_UInt &  uiWidth)

Sets the width of the image. Should only be called by an image decoder.

Parameters
uiWidthWidth of the image.

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