summaryrefslogtreecommitdiffstats
path: root/qt-ui/printlayout.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-07-13 18:09:22 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-07-18 12:00:12 -0700
commit17c97b921fb96d2849a027abe259230c336f1d83 (patch)
tree310a4e50e0f353f8e171a07e1eba6c691114b8c4 /qt-ui/printlayout.cpp
parent3076dc6d47584b42200d050beefa26ac9df8d20c (diff)
downloadsubsurface-17c97b921fb96d2849a027abe259230c336f1d83.tar.gz
Print: pass grayscale flag to setPrintMode()
We pass the value of 'color_selected' stored in the print options to ProfileGraphicsView::setPrintMode(). This way the profile can be printed in grayscale internally instead of converting a QPixmap to grayscale. There are a couple of questions here: 1) Are all the 'if/then' checks for all individual colors faster than the direct QPixmap/QImage grayscale coversation. 2) The direct grayscale conversation does not give control of individual colors, but can it look actually better? Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r--qt-ui/printlayout.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 0ef37d5a3..7061f082b 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -88,7 +88,7 @@ void PrintLayout::printSixDives() const
painter.scale(scaleX, scaleY);
profile->clear();
- profile->setPrintMode(true);
+ profile->setPrintMode(true, !printOptions->color_selected);
QSize originalSize = profile->size();
profile->resize(pageRect.height()/scaleY, pageRect.width()/scaleX);
@@ -108,8 +108,6 @@ void PrintLayout::printSixDives() const
QTransform transform;
transform.rotate(270);
pm = QPixmap(pm.transformed(transform));
- if (!printOptions->color_selected)
- pm = convertPixmapToGrayscale(pm);
painter.drawPixmap(0, 0, pm);
}
painter.end();