summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap_raster.cpp')
-rw-r--r--src/gui/image/qpixmap_raster.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 639650dd89..2161a70464 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -211,9 +211,14 @@ void QRasterPlatformPixmap::fill(const QColor &color)
pixel = qPremultiply(color.rgba());
const QPixelLayout *layout = &qPixelLayouts[image.format()];
layout->convertFromARGB32PM(&pixel, &pixel, 1, layout, 0);
- } else {
+ } else if (image.format() == QImage::Format_Alpha8) {
+ pixel = qAlpha(color.rgba());
+ } else if (image.format() == QImage::Format_Grayscale8) {
+ pixel = qGray(color.rgba());
+ } else
+ {
pixel = 0;
- // ### what about 8 bits
+ // ### what about 8 bit indexed?
}
image.fill(pixel);