kodi
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
CGUITexture Class Referenceabstract
Inheritance diagram for CGUITexture:
Inheritance graph
[legend]
Collaboration diagram for CGUITexture:
Collaboration graph
[legend]

Public Member Functions

virtual CGUITextureClone () const =0
 
bool Process (unsigned int currentTime)
 
void Render ()
 
void DynamicResourceAlloc (bool bOnOff)
 
bool AllocResources ()
 
void FreeResources (bool immediately=false)
 
void SetInvalid ()
 
bool SetVisible (bool visible)
 
bool SetAlpha (unsigned char alpha)
 
bool SetDiffuseColor (UTILS::COLOR::Color color, const CGUIListItem *item=nullptr)
 
bool SetPosition (float x, float y)
 
bool SetWidth (float width)
 
bool SetHeight (float height)
 
bool SetFileName (const std::string &filename)
 
void SetUseCache (const bool useCache=true)
 
bool SetAspectRatio (const CAspectRatio &aspect)
 
const std::string & GetFileName () const
 
float GetTextureWidth () const
 
float GetTextureHeight () const
 
float GetWidth () const
 
float GetHeight () const
 
float GetXPosition () const
 
float GetYPosition () const
 
int GetOrientation () const
 
const CRectGetRenderRect () const
 
bool IsLazyLoaded () const
 
KODI::GUILIB::GUIINFO::CGUIInfoColor GetDiffuseColor () const
 Get the diffuse color (info color) associated to this texture. More...
 
bool HitTest (const CPoint &point) const
 
bool IsAllocated () const
 
bool FailedToAlloc () const
 
bool ReadyToRender () const
 

Static Public Member Functions

static void Register (const CreateGUITextureFunc &createFunction, const DrawQuadFunc &drawQuadFunction)
 
static CGUITextureCreateTexture (float posX, float posY, float width, float height, const CTextureInfo &texture)
 
static void DrawQuad (const CRect &coords, UTILS::COLOR::Color color, CTexture *texture=nullptr, const CRect *texCoords=nullptr)
 

Protected Types

enum  ALLOCATE_TYPE {
  NO = 0, NORMAL, LARGE, NORMAL_FAILED,
  LARGE_FAILED
}
 

Protected Member Functions

 CGUITexture (float posX, float posY, float width, float height, const CTextureInfo &texture)
 
 CGUITexture (const CGUITexture &left)
 
bool CalculateSize ()
 
bool AllocateOnDemand ()
 
bool UpdateAnimFrame (unsigned int currentTime)
 
void Render (float left, float top, float right, float bottom, float u1, float v1, float u2, float v2, float u3, float v3)
 
void ResetAnimState ()
 
virtual void Allocate ()
 
virtual void Free ()
 called after our textures have been allocated
 
virtual void Begin (UTILS::COLOR::Color color)=0
 called after our textures have been freed
 
virtual void Draw (float *x, float *y, float *z, const CRect &texture, const CRect &diffuse, int orientation)=0
 
virtual void End ()=0
 

Static Protected Member Functions

static void OrientateTexture (CRect &rect, float width, float height, int orientation)
 

Protected Attributes

bool m_visible
 
UTILS::COLOR::Color m_diffuseColor
 
float m_posX
 
float m_posY
 
float m_width
 
float m_height
 
CRect m_vertex
 
bool m_invalid
 
bool m_use_cache
 
unsigned char m_alpha
 
float m_frameWidth
 
float m_frameHeight
 
float m_texCoordsScaleU
 
float m_texCoordsScaleV
 
int m_currentLoop
 
unsigned int m_currentFrame
 
uint32_t m_lasttime
 
float m_diffuseU
 
float m_diffuseV
 
float m_diffuseScaleU
 
float m_diffuseScaleV
 
CPoint m_diffuseOffset
 
bool m_allocateDynamically
 
ALLOCATE_TYPE m_isAllocated
 
CTextureInfo m_info
 
CAspectRatio m_aspect
 
CTextureArray m_diffuse
 
CTextureArray m_texture
 

Member Function Documentation

◆ GetDiffuseColor()

KODI::GUILIB::GUIINFO::CGUIInfoColor CGUITexture::GetDiffuseColor ( ) const
inline

Get the diffuse color (info color) associated to this texture.

Returns
the infocolor associated to this texture

◆ Render()

void CGUITexture::Render ( )
Todo:
The diffuse coloring applies to all vertices, which will look weird for stuff with borders, as will the -ve height/width for flipping

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