claw::graphic::pcx Class Reference

A class for pcx pictures. More...

#include <pcx.hpp>

Inheritance diagram for claw::graphic::pcx:
claw::graphic::image

List of all members.

Classes

class  header
 Header of a pcx file. More...
class  reader
 This class read data from a pcx file and store it in an image. More...
class  writer
 This class write an image in a pcx file. More...

Public Member Functions

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

Private Types

enum  format_version {
  v_2_5 = 0, v_2_8_with_palette = 2, v_2_8_without_palette = 3, v_win = 4,
  v_3_0 = 5
}
typedef
unsigned_integer_of_size
< 8 >::type 
u_int_8
typedef
unsigned_integer_of_size
< 16 >::type 
u_int_16
typedef integer_of_size< 8 >::type int_8
typedef integer_of_size< 16 >::type int_16
typedef color_palette
< rgba_pixel_8
color_palette32
 A color palette of RGBA colors.
typedef std::vector< u_int_8color_plane_type
 The type in which we store a scan line of a color plane.

Detailed Description

A class for pcx pictures.

Author:
Julien Jorge

Definition at line 49 of file pcx.hpp.


Member Typedef Documentation

A color palette of RGBA colors.

Definition at line 146 of file pcx.hpp.

typedef std::vector<u_int_8> claw::graphic::pcx::color_plane_type [private]

The type in which we store a scan line of a color plane.

Definition at line 149 of file pcx.hpp.

typedef integer_of_size<16>::type claw::graphic::pcx::int_16 [private]

Definition at line 57 of file pcx.hpp.

typedef integer_of_size<8>::type claw::graphic::pcx::int_8 [private]

Definition at line 56 of file pcx.hpp.

Definition at line 54 of file pcx.hpp.

Definition at line 53 of file pcx.hpp.


Member Enumeration Documentation

Enumerator:
v_2_5 
v_2_8_with_palette 
v_2_8_without_palette 
v_win 
v_3_0 

Definition at line 59 of file pcx.hpp.

00060         {
00061           v_2_5                 = 0,
00062           v_2_8_with_palette    = 2,
00063           v_2_8_without_palette = 3,
00064           v_win                 = 4,
00065           v_3_0                 = 5
00066         }; // enum format_version


Constructor & Destructor Documentation

claw::graphic::pcx::pcx ( 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 pcx.cpp.

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

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

Copy constructor.

Parameters:
that Image to copy from.

Definition at line 50 of file pcx.cpp.

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

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

Constructor. Load an image from a pcx file.

Parameters:
f Pcx file.

Definition at line 61 of file pcx.cpp.

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


Member Function Documentation

void claw::graphic::pcx::save ( std::ostream &  os  )  const

Save the content of the image in a stream.

Parameters:
os The stream in which we write.

Definition at line 71 of file pcx.cpp.

00072 {
00073   writer(*this, os);
00074 } // pcx::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