Function object that converts a scanline of a 8bpp color mapped pcx into 32 bpp pixels. More...
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_palette32 & | m_palette |
The color palette. |
Function object that converts a scanline of a 8bpp color mapped pcx into 32 bpp pixels.
Definition at line 243 of file pcx.hpp.
claw::graphic::pcx::reader::converter_256::converter_256 | ( | const color_palette32 & | palette | ) |
Constructor.
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()
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.
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()()
const color_palette32& claw::graphic::pcx::reader::converter_256::m_palette [private] |