Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_TargaProvider Class Reference

clanDisplay="Surface Providers". More...

#include <provider_targa.h>

Inheritance diagram for CL_TargaProvider:

Inheritance graph
[legend]
Collaboration diagram for CL_TargaProvider:

Collaboration graph
[legend]
List of all members.

Public Methods

 CL_TargaProvider (std::string name, CL_InputSourceProvider *provider, bool transparent=false, bool ignore_alphachannel=false, unsigned char trans_red=0, unsigned char trans_green=0, unsigned char trans_blue=0)
virtual ~CL_TargaProvider ()
 param: name - Name of the targa file to load.param: provider - Input source provider that delivers the targa file.param: transparent - True if a transparency color should be used.param: ignore_alphachannel - True if the alpha component should be ignored.param: trans_red - Red component of the transparency color.param: trans_green - Green component of the transparency color.param: trans_blue - blue component of the transparency color.

virtual unsigned int get_pitch () const
virtual int get_translate_x () const
virtual int get_translate_y () const
 retval: The x-offset of the surface data.

virtual unsigned int get_width () const
virtual unsigned int get_height () const
virtual unsigned int get_num_frames () const
 retval: A pointer that points to the beginning of the target pixel data.

virtual unsigned int get_depth () const
virtual unsigned int get_red_mask () const
virtual unsigned int get_green_mask () const
virtual unsigned int get_blue_mask () const
virtual unsigned int get_alpha_mask () const
virtual bool is_indexed () const
virtual CL_Paletteget_palette () const
virtual bool uses_src_colorkey () const
 retval: The y-offset of the surface data.

virtual unsigned int get_src_colorkey () const
virtual void* get_data () const
virtual void perform_lock ()
virtual void perform_unlock ()

Static Public Methods

CL_Surfacecreate (std::string handle, CL_InputSourceProvider *provider, bool transparent=false, bool ignore_alphachannel=false, unsigned char trans_red=0, unsigned char trans_green=0, unsigned char trans_blue=0)

Private Methods

bool read_rgb_16 (unsigned char *a, unsigned char *b, unsigned char *g, unsigned char *r)
bool read_rgb_24 (unsigned char *a, unsigned char *b, unsigned char *g, unsigned char *r)
bool read_rgb_32 (unsigned char *a, unsigned char *b, unsigned char *g, unsigned char *r)
bool read_rgb (unsigned char *a, unsigned char *b, unsigned char *g, unsigned char *r)
void read_from_colormap (unsigned char *a, unsigned char *b, unsigned char *g, unsigned char *r)
void read_data ()
void read_header (bool read_colormap)
void read_colormapped ()
void read_uncompressed_rgb ()
void read_runlength_encoded_colormapped_rgb ()
void read_runlength_encoded_rgb ()

Private Attributes

std::string filename
bool locked
unsigned char* file
int filesize
unsigned char* image
unsigned short map_length
unsigned char* color_map
unsigned char datatype
int pitch
int height
int no_sprs
int trans_col
int bounding_left
int bounding_top
int bounding_right
int bounding_bottom
int map_direction_x
int map_direction_y
unsigned char bpp
bool transparent
bool ignore_alphachannel
bool use_alphapixels
unsigned char trans_redcol
unsigned char trans_greencol
unsigned char trans_bluecol
int pos
CL_InputSourceProviderprovider
CL_InputSourceinput_source

Detailed Description

clanDisplay="Surface Providers".

Definition at line 27 of file provider_targa.h.


Constructor & Destructor Documentation

CL_TargaProvider::CL_TargaProvider ( std::string name,
CL_InputSourceProvider * provider,
bool transparent = false,
bool ignore_alphachannel = false,
unsigned char trans_red = 0,
unsigned char trans_green = 0,
unsigned char trans_blue = 0 )
 

CL_TargaProvider::~CL_TargaProvider ( ) [virtual]
 

param: name - Name of the targa file to load.param: provider - Input source provider that delivers the targa file.param: transparent - True if a transparency color should be used.param: ignore_alphachannel - True if the alpha component should be ignored.param: trans_red - Red component of the transparency color.param: trans_green - Green component of the transparency color.param: trans_blue - blue component of the transparency color.


Member Function Documentation

CL_Surface* CL_TargaProvider::create ( std::string handle,
CL_InputSourceProvider * provider,
bool transparent = false,
bool ignore_alphachannel = false,
unsigned char trans_red = 0,
unsigned char trans_green = 0,
unsigned char trans_blue = 0 ) [static]
 

unsigned int CL_TargaProvider::get_alpha_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 148 of file provider_targa.h.

unsigned int CL_TargaProvider::get_blue_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 147 of file provider_targa.h.

virtual void* CL_TargaProvider::get_data ( ) const [virtual]
 

Reimplemented from CL_Target.

unsigned int CL_TargaProvider::get_depth ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 142 of file provider_targa.h.

unsigned int CL_TargaProvider::get_green_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 146 of file provider_targa.h.

unsigned int CL_TargaProvider::get_height ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 136 of file provider_targa.h.

unsigned int CL_TargaProvider::get_num_frames ( ) const [inline, virtual]
 

retval: A pointer that points to the beginning of the target pixel data.

Reimplemented from CL_Target.

Definition at line 139 of file provider_targa.h.

CL_Palette * CL_TargaProvider::get_palette ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 152 of file provider_targa.h.

unsigned int CL_TargaProvider::get_pitch ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 124 of file provider_targa.h.

unsigned int CL_TargaProvider::get_red_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 145 of file provider_targa.h.

unsigned int CL_TargaProvider::get_src_colorkey ( ) const [inline, virtual]
 

Reimplemented from CL_SurfaceProvider.

Definition at line 157 of file provider_targa.h.

int CL_TargaProvider::get_translate_x ( ) const [inline, virtual]
 

Reimplemented from CL_SurfaceProvider.

Definition at line 127 of file provider_targa.h.

int CL_TargaProvider::get_translate_y ( ) const [inline, virtual]
 

retval: The x-offset of the surface data.

Reimplemented from CL_SurfaceProvider.

Definition at line 130 of file provider_targa.h.

unsigned int CL_TargaProvider::get_width ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 133 of file provider_targa.h.

bool CL_TargaProvider::is_indexed ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 150 of file provider_targa.h.

virtual void CL_TargaProvider::perform_lock ( ) [virtual]
 

Reimplemented from CL_SurfaceProvider_Generic.

virtual void CL_TargaProvider::perform_unlock ( ) [virtual]
 

Reimplemented from CL_SurfaceProvider_Generic.

void CL_TargaProvider::read_colormapped ( ) [private]
 

void CL_TargaProvider::read_data ( ) [private]
 

void CL_TargaProvider::read_from_colormap ( unsigned char * a,
unsigned char * b,
unsigned char * g,
unsigned char * r ) [private]
 

void CL_TargaProvider::read_header ( bool read_colormap ) [private]
 

bool CL_TargaProvider::read_rgb ( unsigned char * a,
unsigned char * b,
unsigned char * g,
unsigned char * r ) [inline, private]
 

Definition at line 400 of file provider_targa.cpp.

bool CL_TargaProvider::read_rgb_16 ( unsigned char * a,
unsigned char * b,
unsigned char * g,
unsigned char * r ) [inline, private]
 

Definition at line 260 of file provider_targa.cpp.

bool CL_TargaProvider::read_rgb_24 ( unsigned char * a,
unsigned char * b,
unsigned char * g,
unsigned char * r ) [inline, private]
 

Definition at line 319 of file provider_targa.cpp.

bool CL_TargaProvider::read_rgb_32 ( unsigned char * a,
unsigned char * b,
unsigned char * g,
unsigned char * r ) [inline, private]
 

Definition at line 350 of file provider_targa.cpp.

void CL_TargaProvider::read_runlength_encoded_colormapped_rgb ( ) [private]
 

void CL_TargaProvider::read_runlength_encoded_rgb ( ) [private]
 

void CL_TargaProvider::read_uncompressed_rgb ( ) [private]
 

bool CL_TargaProvider::uses_src_colorkey ( ) const [inline, virtual]
 

retval: The y-offset of the surface data.

Reimplemented from CL_SurfaceProvider.

Definition at line 155 of file provider_targa.h.


Member Data Documentation

int CL_TargaProvider::bounding_bottom [private]
 

Definition at line 43 of file provider_targa.h.

int CL_TargaProvider::bounding_left [private]
 

Definition at line 43 of file provider_targa.h.

int CL_TargaProvider::bounding_right [private]
 

Definition at line 43 of file provider_targa.h.

int CL_TargaProvider::bounding_top [private]
 

Definition at line 43 of file provider_targa.h.

unsigned char CL_TargaProvider::bpp [private]
 

Definition at line 46 of file provider_targa.h.

unsigned char* CL_TargaProvider::color_map [private]
 

Definition at line 38 of file provider_targa.h.

unsigned char CL_TargaProvider::datatype [private]
 

Definition at line 40 of file provider_targa.h.

unsigned char* CL_TargaProvider::file [private]
 

Definition at line 32 of file provider_targa.h.

std::string CL_TargaProvider::filename [private]
 

Definition at line 30 of file provider_targa.h.

int CL_TargaProvider::filesize [private]
 

Definition at line 33 of file provider_targa.h.

int CL_TargaProvider::height [private]
 

Definition at line 42 of file provider_targa.h.

bool CL_TargaProvider::ignore_alphachannel [private]
 

Definition at line 48 of file provider_targa.h.

unsigned char* CL_TargaProvider::image [private]
 

Definition at line 35 of file provider_targa.h.

CL_InputSource* CL_TargaProvider::input_source [private]
 

Definition at line 90 of file provider_targa.h.

bool CL_TargaProvider::locked [private]
 

Definition at line 31 of file provider_targa.h.

int CL_TargaProvider::map_direction_x [private]
 

Definition at line 44 of file provider_targa.h.

int CL_TargaProvider::map_direction_y [private]
 

Definition at line 44 of file provider_targa.h.

unsigned short CL_TargaProvider::map_length [private]
 

Definition at line 37 of file provider_targa.h.

int CL_TargaProvider::no_sprs [private]
 

Definition at line 42 of file provider_targa.h.

int CL_TargaProvider::pitch [private]
 

Definition at line 42 of file provider_targa.h.

int CL_TargaProvider::pos [private]
 

Definition at line 51 of file provider_targa.h.

CL_InputSourceProvider* CL_TargaProvider::provider [private]
 

Definition at line 89 of file provider_targa.h.

unsigned char CL_TargaProvider::trans_bluecol [private]
 

Definition at line 49 of file provider_targa.h.

int CL_TargaProvider::trans_col [private]
 

Definition at line 42 of file provider_targa.h.

unsigned char CL_TargaProvider::trans_greencol [private]
 

Definition at line 49 of file provider_targa.h.

unsigned char CL_TargaProvider::trans_redcol [private]
 

Definition at line 49 of file provider_targa.h.

bool CL_TargaProvider::transparent [private]
 

Definition at line 48 of file provider_targa.h.

bool CL_TargaProvider::use_alphapixels [private]
 

Definition at line 48 of file provider_targa.h.


The documentation for this class was generated from the following files:
Generated at Wed Apr 4 19:57:33 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001