@@ -338,6 +338,7 @@ void QgsComposer::on_mActionPrint_activated(void)
338
338
339
339
// set the resolution and paper orientation each time we call up the dialog, not just the first time we run it
340
340
mPrinter ->setResolution (mComposition ->resolution ());
341
+
341
342
if (mComposition ->paperOrientation () == QgsComposition::Portrait)
342
343
{
343
344
mPrinter ->setOrientation (QPrinter::Portrait);
@@ -372,7 +373,7 @@ void QgsComposer::on_mActionPrint_activated(void)
372
373
373
374
std::cout << " Resolution = " << resolution << std::endl;
374
375
375
- double scale = resolution / 25.4 / mComposition ->scale ();
376
+ // double scale = resolution / 25.4 / mComposition->scale();
376
377
377
378
mComposition ->setPlotStyle (QgsComposition::Postscript);
378
379
@@ -404,12 +405,12 @@ void QgsComposer::on_mActionPrint_activated(void)
404
405
}
405
406
406
407
QPainter p (mPrinter );
407
- p.scale (scale, scale);
408
+ // p.scale(scale, scale);
408
409
409
- QRectF renderArea (0 , 0 , (mComposition ->paperWidth () * mComposition ->scale ()),
410
- (mComposition ->paperHeight () * mComposition ->scale ()));
410
+ // QRectF renderArea(0, 0, (mComposition->paperWidth() * mComposition->scale()),
411
+ // (mComposition->paperHeight() * mComposition->scale()));
411
412
412
- mComposition ->canvas ()->render (&p, renderArea);
413
+ mComposition ->canvas ()->render (&p/* , renderArea*/ );
413
414
414
415
p.end ();
415
416
@@ -614,12 +615,13 @@ void QgsComposer::on_mActionPrint_activated(void)
614
615
{
615
616
std::cout << " Printing ... " << std::endl;
616
617
QPainter p (mPrinter );
617
- p.scale (scale, scale);
618
+ // p.scale(scale, scale);
618
619
619
- QRectF renderArea (0 , 0 , (mComposition ->paperWidth () * mComposition ->scale ()),
620
- (mComposition ->paperHeight () * mComposition ->scale ()));
620
+ // MH: is this necessary?
621
+ // QRectF renderArea(0, 0, (mComposition->paperWidth() * mComposition->scale()),
622
+ // (mComposition->paperHeight() * mComposition->scale()));
621
623
622
- mComposition ->canvas ()->render (&p, renderArea);
624
+ mComposition ->canvas ()->render (&p/* , renderArea*/ );
623
625
624
626
p.end ();
625
627
std::cout << " ... printing finished" << std::endl;
0 commit comments