claw::graphic::pcx::reader::rle_pcx_output_buffer Class Reference

List of all members.


Detailed Description

The output buffer for the RLE decoder.

Definition at line 172 of file pcx.hpp.


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_typem_result
 We save uncompressed in this buffer.
unsigned int m_position
 Position of the next byte to write in m_result.

Constructor & Destructor Documentation

claw::graphic::pcx::reader::rle_pcx_output_buffer::rle_pcx_output_buffer ( color_plane_type result  ) 

Constructor.

Parameters:
result The scan line in which we write the uncompressed data.
Precondition:
result is big enough to store the uncompressed data.

Definition at line 178 of file pcx_reader.cpp.

00179   : m_result(result), m_position(0)
00180 {
00181 
00182 } // pcx::reader::rle_pcx_output_buffer::rle_pcx_output_buffer()


Member Function Documentation

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.

Parameters:
n The number of pixel to write.
pattern The pixel to copy.

Definition at line 191 of file pcx_reader.cpp.

References CLAW_PRECOND.

00192 {
00193   CLAW_PRECOND( m_position + n <= m_result.size() );
00194 
00195   for (unsigned int i=0; i!=n; ++i)
00196     m_result[m_position + i] = pattern;
00197 
00198   m_position += n;
00199 } // pcx::reader::rle_pcx_output_buffer::fill()

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.

Parameters:
n The number of pixels to write.
buffer The buffer from which we read.

Definition at line 208 of file pcx_reader.cpp.

References CLAW_ASSERT.

00209 {
00210   CLAW_ASSERT( false, "This method should not have been called" );
00211 } // pcx::reader::rle_pcx_output_buffer::copy()

bool claw::graphic::pcx::reader::rle_pcx_output_buffer::completed (  )  const

Tell if we have completely filled the buffer.

Definition at line 217 of file pcx_reader.cpp.

References m_position, and m_result.

00218 {
00219   return m_position == m_result.size();
00220 } // pcx::reader::rle_pcx_output_buffer::completed()


Member Data Documentation

We save uncompressed in this buffer.

Definition at line 184 of file pcx.hpp.

Referenced by completed().

Position of the next byte to write in m_result.

Definition at line 187 of file pcx.hpp.

Referenced by completed().


The documentation for this class was generated from the following files:

Generated on Thu May 22 21:07:38 2008 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.5.5