claw::graphic::targa Class Reference

A class for targa pictures. More...

#include <targa.hpp>

Inheritance diagram for claw::graphic::targa:
claw::graphic::image

List of all members.

Classes

class  file_structure
 Tool class used for defining the structures of the datas stored in a targa file. More...
struct  pixel16
 A pixel color in 16 bits in targa files. More...
struct  pixel8
 A pixel color in 8 bits in targa files. More...
class  reader
 This class read data from a targa file and store it in an image. More...
class  writer
 This class write an image in a targa file. More...

Public Member Functions

 targa (unsigned int w, unsigned int h)
 Constructor. Creates an empty image.
 targa (const image &that)
 Copy constructor.
 targa (std::istream &f)
 Constructor. Load an image from a targa file.
void save (std::ostream &os, bool rle) const
 Save the content of the image in a stream.

Private Types

typedef color_palette
< rgba_pixel_8
color_palette32
 A color palette of RGBA colors.

Detailed Description

A class for targa pictures.

Author:
Julien Jorge

Definition at line 48 of file targa.hpp.


Member Typedef Documentation

A color palette of RGBA colors.

Definition at line 204 of file targa.hpp.


Constructor & Destructor Documentation

claw::graphic::targa::targa ( unsigned int  w,
unsigned int  h 
)

Constructor. Creates an empty image.

Parameters:
w Image's width.
h Image's height.
Precondition:
w > 0 and h > 0

Definition at line 39 of file targa.cpp.

00040   : claw::graphic::image(w, h)
00041 {
00042 
00043 } // targa::targa() [constructor]

claw::graphic::targa::targa ( const image that  ) 

Copy constructor.

Parameters:
that Image to copy from.

Definition at line 50 of file targa.cpp.

00051   : claw::graphic::image(that)
00052 {
00053 
00054 } // targa::targa() [copy constructor]

claw::graphic::targa::targa ( std::istream &  f  ) 

Constructor. Load an image from a targa file.

Parameters:
f Targa file.

Definition at line 61 of file targa.cpp.

00062 {
00063   reader(*this, f);
00064 } // targa::targa() [constructor, from file]


Member Function Documentation

void claw::graphic::targa::save ( std::ostream &  os,
bool  rle 
) const

Save the content of the image in a stream.

Parameters:
os The stream in which we write.
rle Tell if we must encode the data.

Definition at line 72 of file targa.cpp.

Referenced by claw::graphic::targa::writer::writer().

00073 {
00074   writer(*this, os, rle);
00075 } // targa::save()


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

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1