claw::graphic::pcx::reader::converter_256 Class Reference

Function object that converts a scanline of a 8bpp color mapped pcx into 32 bpp pixels. More...

List of all members.

Public Member Functions

 converter_256 (const color_palette32 &palette)
 Constructor.
void operator() (const std::vector< color_plane_type > &scanline, image &img, unsigned int y) const
 Converts a scan line of a 8 bpp color mapped pcx into 32 bpp pixels.

Private Attributes

const color_palette32m_palette
 The color palette.

Detailed Description

Function object that converts a scanline of a 8bpp color mapped pcx into 32 bpp pixels.

Definition at line 243 of file pcx.hpp.


Constructor & Destructor Documentation

claw::graphic::pcx::reader::converter_256::converter_256 ( const color_palette32 palette  ) 

Constructor.

Parameters:
palette The color palette of the image.

Definition at line 119 of file pcx_reader.cpp.

00120   : m_palette(palette)
00121 {
00122 
00123 } // pcx::reader::converter_256::converter_256()


Member Function Documentation

void claw::graphic::pcx::reader::converter_256::operator() ( const std::vector< color_plane_type > &  scanline,
image img,
unsigned int  y 
) const

Converts a scan line of a 8 bpp color mapped pcx into 32 bpp pixels.

Parameters:
scanline the scan line to convert.
img The image in which we write the results.
y The line of img concerned by the pixels.

Definition at line 133 of file pcx_reader.cpp.

References CLAW_PRECOND.

00135 {
00136   CLAW_PRECOND( scanline.size() == 1 );
00137 
00138   for ( unsigned int x=0; x!=img.width(); ++x )
00139     img[y][x] = m_palette[ scanline[0][x] ];
00140 } // pcx::reader::converter_256::operator()()


Member Data Documentation

The color palette.

Definition at line 253 of file pcx.hpp.


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