Logo Search packages:      
Sourcecode: djvulibre version File versions

void GPixmap::init ( const GPixmap ref  ) 

Resets the GPixmap by copying the size and the contents of the color image ref#. The previous content of the GPixmap is discarded.

Definition at line 373 of file GPixmap.cpp.

References columns(), init(), and rows().

{
  init(ref.rows(), ref.columns(), 0);
  if (nrows>0 && ncolumns>0)
  {
    for (int y=0; y<nrows; y++)
    {
      GPixel *dst = (*this)[y];
      const GPixel *src = ref[y];
      for (int x=0; x<ncolumns; x++)
        dst[x] = src[x];
    }
  }
}


Generated by  Doxygen 1.6.0   Back to index