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

void GBitmap::init ( int  nrows,
int  ncolumns,
int  border = 0 

Resets this GBitmap size to nrows# rows and ncolumns# columns and sets all pixels to white. The optional argument border# specifies the size of the optional border of white pixels surrounding the image. The number of gray levels is initialized to #2#.

Definition at line 208 of file GBitmap.cpp.

References monitor().

Referenced by init(), operator=(), and GBitmapScaler::scale().

  GMonitorLock lock(monitor());
  grays = 2;
  nrows = arows;
  ncolumns = acolumns;
  border = aborder;
  bytes_per_row = ncolumns + border;
  int npixels = nrows * bytes_per_row + border;
  gzerobuffer=zeroes(bytes_per_row + border);
  if (npixels > 0) 
      bytes = bytes_data;

Generated by  Doxygen 1.6.0   Back to index