src/gui/image/qpixmap_raster.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   117     h = height;
   117     h = height;
   118     d = image.depth();
   118     d = image.depth();
   119     is_null = (w <= 0 || h <= 0);
   119     is_null = (w <= 0 || h <= 0);
   120 
   120 
   121     if (pixelType() == BitmapType && !image.isNull()) {
   121     if (pixelType() == BitmapType && !image.isNull()) {
   122         image.setNumColors(2);
   122         image.setColorCount(2);
   123         image.setColor(0, QColor(Qt::color0).rgba());
   123         image.setColor(0, QColor(Qt::color0).rgba());
   124         image.setColor(1, QColor(Qt::color1).rgba());
   124         image.setColor(1, QColor(Qt::color1).rgba());
   125     }
   125     }
   126 
   126 
   127     setSerialNumber(image.serialNumber());
   127     setSerialNumber(image.serialNumber());