diff --git a/Graphs/gXAxis.cpp b/Graphs/gXAxis.cpp index ecb11bf0..d77b9e7f 100644 --- a/Graphs/gXAxis.cpp +++ b/Graphs/gXAxis.cpp @@ -157,9 +157,9 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height) py=left+float(aligned_start-minx)*xmult; - int texttop=top+18*w.printScaleY(); - int mintop=top+4*w.printScaleY(); - int majtop=top+6*w.printScaleY(); + int texttop=top+9.0*(y/7.0)+y; // 18*w.printScaleY(); + int mintop=top+4.0*(y/7.0); + int majtop=top+6.0*(y/7.0); for (int i=0;iresolution() << "dpi"; + qDebug() << "res:" << printer->resolution() << "dpi" << float(res.width()) / float(res.height()); float printer_width=res.width(); float printer_height=res.height()-normal_height; @@ -779,7 +779,7 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date) glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE,&gw); bool no_scaling; - if (printer_width<=gw) { + if (printer_width <= gw) { gw=printer_width; no_scaling=true; } else no_scaling=false; @@ -995,9 +995,9 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date) QFont fc=*bigfont; if (!no_scaling ) { - fa.setPointSizeF(fa.pointSizeF()*1.7); - fb.setPointSizeF(fb.pointSizeF()*1.7); - fc.setPointSizeF(fc.pointSizeF()*1.7); + fa.setPointSizeF(fa.pointSizeF()*2); + fb.setPointSizeF(fb.pointSizeF()*2); + fc.setPointSizeF(fc.pointSizeF()*2); } defaultfont=&fa; @@ -1012,9 +1012,14 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date) g->m_marginbottom=tmb; PROFILE["UseAntiAliasing"]=aa_setting; - QPixmap pm2=pm.scaledToWidth(printer_width); - painter.drawPixmap(0,top,pm2.width(),pm2.height(),pm2); - top+=pm2.height(); + if (!no_scaling) { + QPixmap pm2=pm.scaledToWidth(printer_width); + painter.drawPixmap(0,top,pm2.width(),pm2.height(),pm2); + top+=pm2.height(); + } else { + painter.drawPixmap(0,top,pm.width(),pm.height(),pm); + top+=gh; + } gcnt++; if (qprogress) {