CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csWSTexture Class Reference
[Crystal Space Windowing System]

Texture representation within the windowing system. More...

#include <cswstex.h>

List of all members.

Public Methods

 csWSTexture (const char *iName, iImage *Image, int iFlags)
 Create the 2D texture. More...

 ~csWSTexture ()
 Destroy the texture object. More...

void SetKeyColor (int iR, int iG, int iB)
 Set texture transparent color. More...

void SetKeyColor (bool iEnable)
 Set whenever texture has transparent holes or not. More...

void GetKeyColor (int &oR, int &oG, int &oB)
 Get texture transparent color. More...

bool HasKeyColor ()
 Query whenever texture has transparent areas. More...

void Register (iTextureManager *iTexMan)
 Register the texture with texture manager. More...

void Unregister ()
 Unregister the texture. More...

void Refresh ()
 Refresh the texture in video memory (do iTexMan->PrepareTexture ()). More...

void SetName (const char *iName)
 Define texture name. More...

const char * GetName ()
 Get texture name. More...

iTextureHandleGetHandle ()
 CSWS uses its own reference counting system. More...

void IncRef ()
 Increment reference count to this texture. More...

void DecRef ()
 Delete a reference to this texture. More...

int GetRefCount () const
 Return reference count. More...

const char * GetFileName () const
 Get texture file name. More...

void SetFileName (const char *iFileName)
 Set texture file name. More...

void FixKeyColor ()
 Find nearest transparent color in image. More...

void DontFixKeyColor ()
 Tell texture that transparent color has already been fixed. More...

int GetWidth ()
 Query texture width. More...

int GetHeight ()
 Query texture height. More...


Detailed Description

Texture representation within the windowing system.

The application keeps an array of such objects, and they are registered with the 3D and 2D drivers as soon as app->RegisterTextures() is called.

Definition at line 38 of file cswstex.h.


Constructor & Destructor Documentation

csWSTexture::csWSTexture const char *    iName,
iImage   Image,
int    iFlags
 

Create the 2D texture.

csWSTexture::~csWSTexture  
 

Destroy the texture object.


Member Function Documentation

void csWSTexture::DecRef   [inline]
 

Delete a reference to this texture.

Definition at line 92 of file cswstex.h.

void csWSTexture::DontFixKeyColor   [inline]
 

Tell texture that transparent color has already been fixed.

Definition at line 105 of file cswstex.h.

void csWSTexture::FixKeyColor  
 

Find nearest transparent color in image.

const char* csWSTexture::GetFileName   const [inline]
 

Get texture file name.

Definition at line 98 of file cswstex.h.

iTextureHandle* csWSTexture::GetHandle   [inline]
 

CSWS uses its own reference counting system.

Definition at line 86 of file cswstex.h.

Referenced by csApp::GetTexture.

int csWSTexture::GetHeight  
 

Query texture height.

void csWSTexture::GetKeyColor int &    oR,
int &    oG,
int &    oB
[inline]
 

Get texture transparent color.

Definition at line 69 of file cswstex.h.

const char* csWSTexture::GetName   [inline]
 

Get texture name.

Definition at line 83 of file cswstex.h.

int csWSTexture::GetRefCount   const [inline]
 

Return reference count.

Definition at line 95 of file cswstex.h.

int csWSTexture::GetWidth  
 

Query texture width.

bool csWSTexture::HasKeyColor   [inline]
 

Query whenever texture has transparent areas.

Definition at line 72 of file cswstex.h.

void csWSTexture::IncRef   [inline]
 

Increment reference count to this texture.

Definition at line 89 of file cswstex.h.

void csWSTexture::Refresh  
 

Refresh the texture in video memory (do iTexMan->PrepareTexture ()).

void csWSTexture::Register iTextureManager   iTexMan
 

Register the texture with texture manager.

void csWSTexture::SetFileName const char *    iFileName
 

Set texture file name.

void csWSTexture::SetKeyColor bool    iEnable
 

Set whenever texture has transparent holes or not.

void csWSTexture::SetKeyColor int    iR,
int    iG,
int    iB
 

Set texture transparent color.

void csWSTexture::SetName const char *    iName
 

Define texture name.

void csWSTexture::Unregister  
 

Unregister the texture.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14