Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLTGADecoder Class Reference

Targa file decoder. More...

#include <pltgadec.h>

Inheritance diagram for PLTGADecoder:

Inheritance graph
[legend]
Collaboration diagram for PLTGADecoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLTGADecoder ()
 Creates a decoder.
virtual ~PLTGADecoder ()
 Destroys a decoder.

Protected Member Functions

virtual void DoDecode (PLBmp *pBmp, PLDataSource *pDataSrc)
 Main decoder routine.

Private Member Functions

void readTgaHeader (TGAHEADER *pTgaHead, PLDataSource *pDataSrc)
void readPalette (int StartIndex, int Length, int EntrySize, PLBmp *pBmp, PLDataSource *pDataSrc)
void readImage (TGAHEADER *pTgaHead, PLBmp *pBmp, PLDataSource *pDataSrc)
void readData (TGAHEADER *pTgaHead, bool bCompressed, PLBmp *pBmp, PLDataSource *pDataSrc)
void expandUncompressedLine (PLBYTE *pDest, int Width, bool bReversed, int bpp, PLDataSource *pDataSrc)
void expandCompressedLine (PLBYTE *pDest, int Width, bool bReversed, int bpp, PLDataSource *pDataSrc)
PLPixel32 readPixel32 (int bpp, PLDataSource *pDataSrc)
PLBYTE readPixel8 (int bpp, PLDataSource *pDataSrc)

Detailed Description

Targa file decoder.

Decodes 8, 15, 16, 24 and 32 bpp targa files (compressed and uncompressed) and returns an 8 or 32 bpp CBitmap. Preserves the alpha channel.

Definition at line 25 of file pltgadec.h.


Constructor & Destructor Documentation

PLTGADecoder::PLTGADecoder  ) 
 

Creates a decoder.

Definition at line 22 of file pltgadec.cpp.

PLTGADecoder::~PLTGADecoder  )  [virtual]
 

Destroys a decoder.

Definition at line 30 of file pltgadec.cpp.


Member Function Documentation

void PLTGADecoder::DoDecode PLBmp pBmp,
PLDataSource pDataSrc
[protected, virtual]
 

Main decoder routine.

Reads the header, Creates the bitmap, reads the palette, and reads the image data.

Reimplemented from PLPicDecoder.

Definition at line 36 of file pltgadec.cpp.

References _TgaHeader::CmapEntrySize, _TgaHeader::CmapIndex, _TgaHeader::CmapLength, _TgaHeader::CmapType, _TgaHeader::ImageHeight, _TgaHeader::ImageWidth, _TgaHeader::PixelDepth, and TGAHEADER.

void PLTGADecoder::expandCompressedLine PLBYTE pDest,
int  Width,
bool  bReversed,
int  bpp,
PLDataSource pDataSrc
[private]
 

Definition at line 224 of file pltgadec.cpp.

References PLBYTE.

void PLTGADecoder::expandUncompressedLine PLBYTE pDest,
int  Width,
bool  bReversed,
int  bpp,
PLDataSource pDataSrc
[private]
 

Definition at line 198 of file pltgadec.cpp.

References PLBYTE.

void PLTGADecoder::readData TGAHEADER pTgaHead,
bool  bCompressed,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 152 of file pltgadec.cpp.

References PLBYTE, and TGAHEADER.

void PLTGADecoder::readImage TGAHEADER pTgaHead,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 121 of file pltgadec.cpp.

References PL_ERRFORMAT_UNKNOWN, raiseError(), TGA_Map, TGA_Mono, TGA_RGB, TGA_RLEMap, TGA_RLEMono, TGA_RLERGB, and TGAHEADER.

Here is the call graph for this function:

void PLTGADecoder::readPalette int  StartIndex,
int  Length,
int  EntrySize,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 102 of file pltgadec.cpp.

PLPixel32 PLTGADecoder::readPixel32 int  bpp,
PLDataSource pDataSrc
[private]
 

Definition at line 275 of file pltgadec.cpp.

References PLBYTE, PLWORD, and PLPixel32::Set().

Here is the call graph for this function:

PLBYTE PLTGADecoder::readPixel8 int  bpp,
PLDataSource pDataSrc
[private]
 

Definition at line 316 of file pltgadec.cpp.

References PLASSERT, and PLBYTE.

void PLTGADecoder::readTgaHeader TGAHEADER pTgaHead,
PLDataSource pDataSrc
[private]
 

Definition at line 78 of file pltgadec.cpp.

References TGAHEADER.


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:01 2004 for vuVolume by  doxygen 1.3.9.1