From 17c97b921fb96d2849a027abe259230c336f1d83 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 13 Jul 2013 18:09:22 +0300 Subject: 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 --- qt-ui/printlayout.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'qt-ui') 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(); -- cgit v1.2.3-70-g09d2