The output buffer for the RLE decoder. More...
Public Member Functions | |
| rle_pcx_output_buffer (color_plane_type &result) | |
| Constructor. | |
| void | fill (unsigned int n, u_int_8 pattern) |
| Copy a pixel a certain number of times. | |
| void | copy (unsigned int n, rle_pcx_input_buffer &buffer) |
| Direct copy of a certain number of pixels from the file. | |
| bool | completed () const |
| Tell if we have completely filled the buffer. | |
Private Attributes | |
| color_plane_type & | m_result |
| We save uncompressed in this buffer. | |
| unsigned int | m_position |
| Position of the next byte to write in m_result. | |
The output buffer for the RLE decoder.
Definition at line 172 of file pcx.hpp.
| claw::graphic::pcx::reader::rle_pcx_output_buffer::rle_pcx_output_buffer | ( | color_plane_type & | result | ) |
Constructor.
| result | The scan line in which we write the uncompressed data. |
Definition at line 175 of file pcx_reader.cpp.
00176 : m_result(result), m_position(0) 00177 { 00178 00179 } // pcx::reader::rle_pcx_output_buffer::rle_pcx_output_buffer()
| bool claw::graphic::pcx::reader::rle_pcx_output_buffer::completed | ( | ) | const |
Tell if we have completely filled the buffer.
Definition at line 214 of file pcx_reader.cpp.
References m_position, and m_result.
00215 { 00216 return m_position == m_result.size(); 00217 } // pcx::reader::rle_pcx_output_buffer::completed()
| void claw::graphic::pcx::reader::rle_pcx_output_buffer::copy | ( | unsigned int | n, | |
| rle_pcx_input_buffer & | buffer | |||
| ) |
Direct copy of a certain number of pixels from the file.
| n | The number of pixels to write. | |
| buffer | The buffer from which we read. |
Definition at line 205 of file pcx_reader.cpp.
References CLAW_ASSERT.
00206 { 00207 CLAW_ASSERT( false, "This method should not have been called" ); 00208 } // pcx::reader::rle_pcx_output_buffer::copy()
| void claw::graphic::pcx::reader::rle_pcx_output_buffer::fill | ( | unsigned int | n, | |
| u_int_8 | pattern | |||
| ) |
Copy a pixel a certain number of times.
| n | The number of pixel to write. | |
| pattern | The pixel to copy. |
Definition at line 188 of file pcx_reader.cpp.
References CLAW_PRECOND.
00189 { 00190 CLAW_PRECOND( m_position + n <= m_result.size() ); 00191 00192 for (unsigned int i=0; i!=n; ++i) 00193 m_result[m_position + i] = pattern; 00194 00195 m_position += n; 00196 } // pcx::reader::rle_pcx_output_buffer::fill()
unsigned int claw::graphic::pcx::reader::rle_pcx_output_buffer::m_position [private] |
Position of the next byte to write in m_result.
Definition at line 187 of file pcx.hpp.
Referenced by completed().
We save uncompressed in this buffer.
Definition at line 184 of file pcx.hpp.
Referenced by completed().
1.6.1