RLE decoder for targa RLE format. More...
Public Types | |
typedef InputBuffer | input_buffer_type |
Type of the input buffer. | |
typedef OutputBuffer | output_buffer_type |
Type of the output buffer. | |
Private Member Functions | |
virtual void | read_mode (input_buffer_type &input, output_buffer_type &output) |
Get the type of the following data in the input buffer. |
RLE decoder for targa RLE format.
Template parameters :
The OutputBuffer type must match the type requirements of the template parameter OutputBuffer of the rle_decoder class.
Definition at line 326 of file targa.hpp.
typedef InputBuffer claw::graphic::targa::reader::rle_targa_decoder< InputBuffer, OutputBuffer >::input_buffer_type |
Type of the input buffer.
Reimplemented from claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >.
typedef OutputBuffer claw::graphic::targa::reader::rle_targa_decoder< InputBuffer, OutputBuffer >::output_buffer_type |
Type of the output buffer.
Reimplemented from claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >.
void claw::graphic::targa::reader::rle_targa_decoder< InputBuffer, OutputBuffer >::read_mode | ( | input_buffer_type & | input, | |
output_buffer_type & | output | |||
) | [inline, private, virtual] |
Get the type of the following data in the input buffer.
Implements claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >.
Definition at line 199 of file targa_reader.tpp.
References claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::compressed, claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::m_count, claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::m_mode, claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::m_pattern, claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::raw, and claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::stop.
00200 { 00201 this->m_mode = this->stop; 00202 bool ok = !output.completed(); 00203 00204 if ( ok && (input.remaining() < 1) ) 00205 ok = input.read_more(1); 00206 00207 if (ok) 00208 { 00209 char key = input.get_next(); 00210 00211 this->m_count = (key & 0x7F) + 1; 00212 00213 if (key & 0x80) // compressed 00214 { 00215 this->m_mode = this->compressed; 00216 this->m_pattern = input.get_pixel(); 00217 } 00218 else 00219 this->m_mode = this->raw; 00220 } 00221 } // targa::reader::rle_targa_decoder::read_mode()