Public Member Functions | Private Attributes

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

The output buffer for the RLE decoder. More...

List of all members.

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.

Detailed Description

The output buffer for the RLE decoder.

Definition at line 172 of file pcx.hpp.


Constructor & Destructor Documentation

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

Constructor.

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

Definition at line 175 of file pcx_reader.cpp.

  : m_result(result), m_position(0)
{

} // pcx::reader::rle_pcx_output_buffer::rle_pcx_output_buffer()

Member Function Documentation

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.

{
  return m_position == m_result.size();
} // 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.

Parameters:
nThe number of pixels to write.
bufferThe buffer from which we read.

Definition at line 205 of file pcx_reader.cpp.

References CLAW_ASSERT.

{
  CLAW_ASSERT( false, "This method should not have been called" );
} // 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.

Parameters:
nThe number of pixel to write.
patternThe pixel to copy.

Definition at line 188 of file pcx_reader.cpp.

References CLAW_PRECOND.

{
  CLAW_PRECOND( m_position + n <= m_result.size() );

  for (unsigned int i=0; i!=n; ++i)
    m_result[m_position + i] = pattern;

  m_position += n;
} // pcx::reader::rle_pcx_output_buffer::fill()

Member Data Documentation

Position of the next byte to write in m_result.

Definition at line 187 of file pcx.hpp.

We save uncompressed in this buffer.

Definition at line 184 of file pcx.hpp.


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