From 786816296a8e6b302e40a469f62ffd4d60f9e8e7 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 14 Dec 2011 21:23:49 +1000 Subject: [PATCH] Simplify graph scaling in reports.. Much quicker. :) --- mainwindow.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index ce61ec58..58ab547c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1042,15 +1042,9 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date) g->m_marginbottom=tmb; PROFILE["UseAntiAliasing"]=aa_setting; - QPixmap pm2; - if (!no_scaling) { - pm2=pm.scaledToWidth(printer_width); - } else { - pm2=pm; - } - painter.drawPixmap(0,top,pm2.width(),pm2.height(),pm2); - top+=pm2.height(); + painter.drawPixmap(0,top,printer_width,full_graph_height,pm); + top+=full_graph_height; gcnt++; if (qprogress) {