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

void GBitmap::minborder ( int  minimum  ) 

Makes sure that the border is at least minimum# pixels large. This function does nothing it the border width is already larger than minimum#. Otherwise it reorganizes the data in order to provide a border of minimum# pixels.

Definition at line 440 of file GBitmap.cpp.

References bytes, bytes_per_row, gbytes_data, and monitor().

Referenced by init().

{
  if (border < minimum)
    {
      GMonitorLock lock(monitor());
      if (border < minimum)
        {
          if (bytes)
            {
              GBitmap tmp(*this, minimum);
              bytes_per_row = tmp.bytes_per_row;
              tmp.gbytes_data.swap(gbytes_data);
              bytes = bytes_data;
              tmp.bytes = 0;
            }
          border = minimum;
          gzerobuffer=zeroes(border + ncolumns + border);
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index