CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
Public Member Functions | Private Attributes
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:
paletteThe color palette of the image.

Definition at line 119 of file pcx_reader.cpp.

  : m_palette(palette)
{

} // 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:
scanlinethe scan line to convert.
imgThe image in which we write the results.
yThe line of img concerned by the pixels.

Definition at line 133 of file pcx_reader.cpp.

References CLAW_PRECOND.

{
  CLAW_PRECOND( scanline.size() == 1 );

  for ( unsigned int x=0; x!=img.width(); ++x )
    img[y][x] = m_palette[ scanline[0][x] ];
} // 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: