mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Bypass the PDF bug by painting on a QImage and paint the image to pdf
well... we have a good and working printing system now. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
10ed5da325
commit
94bcd2622a
1 changed files with 5 additions and 1 deletions
|
@ -193,10 +193,14 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
|||
}
|
||||
QTransform origTransform = painter.transform();
|
||||
|
||||
QImage image(scaledW, scaledH - tableH - padPT, QImage::Format_ARGB32);
|
||||
QPainter imgPainter(&image);
|
||||
// draw a profile
|
||||
painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetProfile);
|
||||
profile->plotDive(dive, true); // make sure the profile is actually redrawn
|
||||
profile->render(&painter, QRect(0, 0, scaledW, scaledH - tableH - padPT));
|
||||
profile->render(&imgPainter, QRect(0, 0, scaledW, scaledH - tableH - padPT));
|
||||
imgPainter.end();
|
||||
painter.drawImage(image.rect(),image);
|
||||
painter.setTransform(origTransform);
|
||||
|
||||
// draw a table
|
||||
|
|
Loading…
Add table
Reference in a new issue