CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csWSTexture Class Reference
[Crystal Space Windowing System]

Texture representation within the windowing system. More...

#include <csws/cswstex.h>

List of all members.

Public Member Functions

 csWSTexture (const char *iName, iImage *Image, int iFlags)
 Create the 2D texture.
 ~csWSTexture ()
 Destroy the texture object.
void SetKeyColor (int iR, int iG, int iB)
 Set texture transparent color.
void SetKeyColor (bool iEnable)
 Set whenever texture has transparent holes or not.
void GetKeyColor (int &oR, int &oG, int &oB) const
 Get texture transparent color.
bool HasKeyColor () const
 Query whenever texture has transparent areas.
void Register (iTextureManager *iTexMan)
 Register the texture with texture manager.
void Unregister ()
 Unregister the texture.
void Refresh ()
 Refresh the texture in video memory.
void SetName (const char *iName)
 Define texture name.
const char * GetName () const
 Get texture name.
iTextureHandleGetHandle ()
 CSWS uses its own reference counting system.
void IncRef ()
 Increment reference count to this texture.
void DecRef ()
 Delete a reference to this texture.
int GetRefCount () const
 Return reference count.
const char * GetFileName () const
 Get texture file name.
void SetFileName (const char *iFileName)
 Set texture file name.
void FixKeyColor ()
 Find nearest transparent color in image.
void DontFixKeyColor ()
 Tell texture that transparent color has already been fixed.
int GetWidth ()
 Query texture width.
int GetHeight ()
 Query texture height.


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 40 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 94 of file cswstex.h.

void csWSTexture::DontFixKeyColor  )  [inline]
 

Tell texture that transparent color has already been fixed.

Definition at line 107 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 100 of file cswstex.h.

iTextureHandle* csWSTexture::GetHandle  )  [inline]
 

CSWS uses its own reference counting system.

Definition at line 88 of file cswstex.h.

Referenced by csApp::GetTexture().

int csWSTexture::GetHeight  ) 
 

Query texture height.

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

Get texture transparent color.

Definition at line 71 of file cswstex.h.

const char* csWSTexture::GetName  )  const [inline]
 

Get texture name.

Definition at line 85 of file cswstex.h.

int csWSTexture::GetRefCount  )  const [inline]
 

Return reference count.

Definition at line 97 of file cswstex.h.

int csWSTexture::GetWidth  ) 
 

Query texture width.

bool csWSTexture::HasKeyColor  )  const [inline]
 

Query whenever texture has transparent areas.

Definition at line 74 of file cswstex.h.

void csWSTexture::IncRef  )  [inline]
 

Increment reference count to this texture.

Definition at line 91 of file cswstex.h.

void csWSTexture::Refresh  ) 
 

Refresh the texture in video memory.

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.3.9.1