claw::graphic::bitmap::reader::pixel8_to_pixel32 Class Reference

Functor converting a 8bpp buffer to a 32bpp buffer. More...

List of all members.

Public Member Functions

void operator() (scanline &dest, const char *src, const color_palette_type &palette) const
 Convert a 8bpp array to a pixel32 scanline.

Detailed Description

Functor converting a 8bpp buffer to a 32bpp buffer.

Definition at line 239 of file bitmap.hpp.


Member Function Documentation

void claw::graphic::bitmap::reader::pixel8_to_pixel32::operator() ( scanline dest,
const char *  src,
const color_palette_type palette 
) const

Convert a 8bpp array to a pixel32 scanline.

Parameters:
dest (out) Filled scanline.
src Pixel array to convert.
palette Color palette.
Precondition:
palette.size() == 256

Definition at line 246 of file bitmap_reader.cpp.

References claw::graphic::image::scanline::begin(), and claw::graphic::image::scanline::size().

00247 {
00248   assert(palette.size() == 256);
00249 
00250   const unsigned char* s = reinterpret_cast<const unsigned char*>(src);
00251 
00252   std::transform(s, s + dest.size(), dest.begin(), palette);
00253 } // bitmap::reader::pixel8_to_pixel32()


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