Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CGUITextureBase Class Referenceabstract

#include <GUITexture.h>

Inheritance diagram for CGUITextureBase:
CGUITextureD3D CGUITextureGL CGUITextureGLES

Public Member Functions

 CGUITextureBase (float posX, float posY, float width, float height, const CTextureInfo &texture)
 
 CGUITextureBase (const CGUITextureBase &left)
 
virtual ~CGUITextureBase (void)
 
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)
 
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
 
bool HitTest (const CPoint &point) const
 
bool IsAllocated () const
 
bool FailedToAlloc () const
 
bool ReadyToRender () const
 

Protected Types

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

Protected Member Functions

bool CalculateSize ()
 
void LoadDiffuseImage ()
 
bool AllocateOnDemand ()
 
bool UpdateAnimFrame (unsigned int currentTime)
 
void Render (float left, float top, float bottom, float right, 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 More...
 
virtual void Begin (UTILS::Color color)
 called after our textures have been freed More...
 
virtual void Draw (float *x, float *y, float *z, const CRect &texture, const CRect &diffuse, int orientation)=0
 
virtual void End ()
 

Static Protected Member Functions

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

Protected Attributes

bool m_visible
 
UTILS::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 Enumeration Documentation

◆ ALLOCATE_TYPE

Enumerator
NO 
NORMAL 
LARGE 
NORMAL_FAILED 
LARGE_FAILED 

Constructor & Destructor Documentation

◆ CGUITextureBase() [1/2]

CGUITextureBase::CGUITextureBase ( float  posX,
float  posY,
float  width,
float  height,
const CTextureInfo texture 
)

◆ CGUITextureBase() [2/2]

CGUITextureBase::CGUITextureBase ( const CGUITextureBase left)

◆ ~CGUITextureBase()

CGUITextureBase::~CGUITextureBase ( void  )
virtualdefault

Member Function Documentation

◆ Allocate()

virtual void CGUITextureBase::Allocate ( )
inlineprotectedvirtual

◆ AllocateOnDemand()

bool CGUITextureBase::AllocateOnDemand ( )
protected

◆ AllocResources()

bool CGUITextureBase::AllocResources ( )

◆ Begin()

virtual void CGUITextureBase::Begin ( UTILS::Color  color)
inlineprotectedvirtual

called after our textures have been freed

Reimplemented in CGUITextureD3D, CGUITextureGLES, and CGUITextureGL.

◆ CalculateSize()

bool CGUITextureBase::CalculateSize ( )
protected

◆ Draw()

virtual void CGUITextureBase::Draw ( float *  x,
float *  y,
float *  z,
const CRect texture,
const CRect diffuse,
int  orientation 
)
protectedpure virtual

◆ DynamicResourceAlloc()

void CGUITextureBase::DynamicResourceAlloc ( bool  bOnOff)

◆ End()

virtual void CGUITextureBase::End ( )
inlineprotectedvirtual

Reimplemented in CGUITextureD3D, CGUITextureGLES, and CGUITextureGL.

◆ FailedToAlloc()

bool CGUITextureBase::FailedToAlloc ( ) const
inline

◆ Free()

virtual void CGUITextureBase::Free ( )
inlineprotectedvirtual

called after our textures have been allocated

◆ FreeResources()

void CGUITextureBase::FreeResources ( bool  immediately = false)

◆ GetFileName()

const std::string & CGUITextureBase::GetFileName ( ) const
inline

◆ GetHeight()

float CGUITextureBase::GetHeight ( ) const
inline

◆ GetOrientation()

int CGUITextureBase::GetOrientation ( ) const

◆ GetRenderRect()

const CRect & CGUITextureBase::GetRenderRect ( ) const
inline

◆ GetTextureHeight()

float CGUITextureBase::GetTextureHeight ( ) const
inline

◆ GetTextureWidth()

float CGUITextureBase::GetTextureWidth ( ) const
inline

◆ GetWidth()

float CGUITextureBase::GetWidth ( ) const
inline

◆ GetXPosition()

float CGUITextureBase::GetXPosition ( ) const
inline

◆ GetYPosition()

float CGUITextureBase::GetYPosition ( ) const
inline

◆ HitTest()

bool CGUITextureBase::HitTest ( const CPoint point) const
inline

◆ IsAllocated()

bool CGUITextureBase::IsAllocated ( ) const
inline

◆ IsLazyLoaded()

bool CGUITextureBase::IsLazyLoaded ( ) const
inline

◆ LoadDiffuseImage()

void CGUITextureBase::LoadDiffuseImage ( )
protected

◆ OrientateTexture()

void CGUITextureBase::OrientateTexture ( CRect rect,
float  width,
float  height,
int  orientation 
)
staticprotected

◆ Process()

bool CGUITextureBase::Process ( unsigned int  currentTime)

◆ ReadyToRender()

bool CGUITextureBase::ReadyToRender ( ) const

◆ Render() [1/2]

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

◆ Render() [2/2]

void CGUITextureBase::Render ( float  left,
float  top,
float  bottom,
float  right,
float  u1,
float  v1,
float  u2,
float  v2,
float  u3,
float  v3 
)
protected

◆ ResetAnimState()

void CGUITextureBase::ResetAnimState ( )
protected

◆ SetAlpha()

bool CGUITextureBase::SetAlpha ( unsigned char  alpha)

◆ SetAspectRatio()

bool CGUITextureBase::SetAspectRatio ( const CAspectRatio aspect)

◆ SetDiffuseColor()

bool CGUITextureBase::SetDiffuseColor ( UTILS::Color  color)

◆ SetFileName()

bool CGUITextureBase::SetFileName ( const std::string &  filename)

◆ SetHeight()

bool CGUITextureBase::SetHeight ( float  height)

◆ SetInvalid()

void CGUITextureBase::SetInvalid ( )

◆ SetPosition()

bool CGUITextureBase::SetPosition ( float  x,
float  y 
)

◆ SetUseCache()

void CGUITextureBase::SetUseCache ( const bool  useCache = true)

◆ SetVisible()

bool CGUITextureBase::SetVisible ( bool  visible)

◆ SetWidth()

bool CGUITextureBase::SetWidth ( float  width)

◆ UpdateAnimFrame()

bool CGUITextureBase::UpdateAnimFrame ( unsigned int  currentTime)
protected

Member Data Documentation

◆ m_allocateDynamically

bool CGUITextureBase::m_allocateDynamically
protected

◆ m_alpha

unsigned char CGUITextureBase::m_alpha
protected

◆ m_aspect

CAspectRatio CGUITextureBase::m_aspect
protected

◆ m_currentFrame

unsigned int CGUITextureBase::m_currentFrame
protected

◆ m_currentLoop

int CGUITextureBase::m_currentLoop
protected

◆ m_diffuse

CTextureArray CGUITextureBase::m_diffuse
protected

◆ m_diffuseColor

UTILS::Color CGUITextureBase::m_diffuseColor
protected

◆ m_diffuseOffset

CPoint CGUITextureBase::m_diffuseOffset
protected

◆ m_diffuseScaleU

float CGUITextureBase::m_diffuseScaleU
protected

◆ m_diffuseScaleV

float CGUITextureBase::m_diffuseScaleV
protected

◆ m_diffuseU

float CGUITextureBase::m_diffuseU
protected

◆ m_diffuseV

float CGUITextureBase::m_diffuseV
protected

◆ m_frameHeight

float CGUITextureBase::m_frameHeight
protected

◆ m_frameWidth

float CGUITextureBase::m_frameWidth
protected

◆ m_height

float CGUITextureBase::m_height
protected

◆ m_info

CTextureInfo CGUITextureBase::m_info
protected

◆ m_invalid

bool CGUITextureBase::m_invalid
protected

◆ m_isAllocated

ALLOCATE_TYPE CGUITextureBase::m_isAllocated
protected

◆ m_lasttime

uint32_t CGUITextureBase::m_lasttime
protected

◆ m_posX

float CGUITextureBase::m_posX
protected

◆ m_posY

float CGUITextureBase::m_posY
protected

◆ m_texCoordsScaleU

float CGUITextureBase::m_texCoordsScaleU
protected

◆ m_texCoordsScaleV

float CGUITextureBase::m_texCoordsScaleV
protected

◆ m_texture

CTextureArray CGUITextureBase::m_texture
protected

◆ m_use_cache

bool CGUITextureBase::m_use_cache
protected

◆ m_vertex

CRect CGUITextureBase::m_vertex
protected

◆ m_visible

bool CGUITextureBase::m_visible
protected

◆ m_width

float CGUITextureBase::m_width
protected

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