claw::graphic::pcx::reader::converter_true_color Class Reference

Function object that converts a scanline of a 3 planes true color scanline into 32 bpp pixels. More...

List of all members.

Public Member Functions

void operator() (const std::vector< color_plane_type > &scanline, image &img, unsigned int y) const
 Converts a scan line of a 3 planes true color pcx into 32 bpp pixels.

Detailed Description

Function object that converts a scanline of a 3 planes true color scanline into 32 bpp pixels.

Definition at line 262 of file pcx.hpp.


Member Function Documentation

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

Converts a scan line of a 3 planes true color 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 150 of file pcx_reader.cpp.

References CLAW_PRECOND.

00152 {
00153   CLAW_PRECOND( scanline.size() == 3 );
00154 
00155   for ( unsigned int x=0; x!=img.width(); ++x )
00156     {
00157       img[y][x].components.red = scanline[0][x];
00158       img[y][x].components.green = scanline[1][x];
00159       img[y][x].components.blue = scanline[2][x];
00160       img[y][x].components.alpha =
00161         std::numeric_limits<rgba_pixel_8::component_type>::max();
00162     }
00163 } // pcx::reader::converter_true_color::operator()()


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