summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_raster.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-07-12 09:49:12 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-07-18 10:50:12 +0200
commitbc0a0281d535079745ed1544a063571b86ca718e (patch)
tree8994e4f02518ebb4acc6d4672c942aa276752295 /src/gui/image/qpixmap_raster.cpp
parenta81093b9150b2f1727de6e9e77b8bdddb1c909ee (diff)
Get rid of some obsolete functions in QImage / QPixmap / QPixmapData.
Change-Id: I0d2412c9196475b926a17de9fcc3281f6625fae0 Reviewed-on: http://codereview.qt.nokia.com/1733 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/image/qpixmap_raster.cpp')
-rw-r--r--src/gui/image/qpixmap_raster.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 6c8952b10e..a0ae88dc70 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -58,9 +58,6 @@
QT_BEGIN_NAMESPACE
-const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
- 0x10, 0x20, 0x40, 0x80 };
-
QPixmap qt_toRasterPixmap(const QImage &image)
{
QPixmapData *data =
@@ -265,45 +262,6 @@ void QRasterPixmapData::fill(const QColor &color)
image.fill(pixel);
}
-void QRasterPixmapData::setMask(const QBitmap &mask)
-{
- if (mask.size().isEmpty()) {
- if (image.depth() != 1) { // hw: ????
- image = image.convertToFormat(QImage::Format_RGB32);
- }
- } else {
- const int w = image.width();
- const int h = image.height();
-
- switch (image.depth()) {
- case 1: {
- const QImage imageMask = mask.toImage().convertToFormat(image.format());
- for (int y = 0; y < h; ++y) {
- const uchar *mscan = imageMask.scanLine(y);
- uchar *tscan = image.scanLine(y);
- int bytesPerLine = image.bytesPerLine();
- for (int i = 0; i < bytesPerLine; ++i)
- tscan[i] &= mscan[i];
- }
- break;
- }
- default: {
- const QImage imageMask = mask.toImage().convertToFormat(QImage::Format_MonoLSB);
- image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
- for (int y = 0; y < h; ++y) {
- const uchar *mscan = imageMask.scanLine(y);
- QRgb *tscan = (QRgb *)image.scanLine(y);
- for (int x = 0; x < w; ++x) {
- if (!(mscan[x>>3] & qt_pixmap_bit_mask[x&7]))
- tscan[x] = 0;
- }
- }
- break;
- }
- }
- }
-}
-
bool QRasterPixmapData::hasAlphaChannel() const
{
return image.hasAlphaChannel();
@@ -337,11 +295,6 @@ QImage QRasterPixmapData::toImage(const QRect &rect) const
return image.copy(clipped);
}
-void QRasterPixmapData::setAlphaChannel(const QPixmap &alphaChannel)
-{
- image.setAlphaChannel(alphaChannel.toImage());
-}
-
QPaintEngine* QRasterPixmapData::paintEngine() const
{
return image.paintEngine();