Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

void GBitmap::append_run ( unsigned char *&  data,
int  count 
) [inline, static]

Static function for generating run data. This function encoded run length count# at position data# and increments the pointer accordingly. The pointer must initially point to a large enough data buffer.

Definition at line 642 of file GBitmap.h.

Referenced by MMRDecoder::scanrle().

{
  if (count < RUNOVERFLOWVALUE)
    {
      data[0] = count;
      data += 1;
    }
  else if (count <= MAXRUNSIZE)
    {
      data[0] = (count>>8) + GBitmap::RUNOVERFLOWVALUE;
      data[1] = (count & 0xff);
      data += 2;
    }
  else
    {
      append_long_run(data, count);
    }
}


Generated by  Doxygen 1.6.0   Back to index