From 8cd4a5f3d1109cb1ded07f35556a77089350fe41 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 11 Jul 2014 20:22:19 -0300 Subject: Render the table print in curves. We can use QPicture to record the painting done by a QPainter and it will be saved in vector format, then we can simply paint that. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/printlayout.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index 8327105ba..159cd04db 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -6,6 +6,8 @@ #include #include #include +#include + #include "mainwindow.h" #include "../dive.h" #include "../display.h" @@ -136,6 +138,9 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) painter.setRenderHint(QPainter::SmoothPixmapTransform); painter.scale(scaleX, scaleY); + QPicture pic; + QPainter picPainter; + // setup the profile widget QPointer profile = MainWindow::instance()->graphics(); const int profileFrameStyle = profile->frameStyle(); @@ -196,7 +201,10 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) // draw a table painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetTable); model.setDive(dive); - table->render(&painter); + picPainter.begin(&pic); + table->render(&picPainter); + picPainter.end(); + painter.drawPicture(QPoint(0,0), pic); painter.setTransform(origTransform); col++; printed++; -- cgit v1.2.3-70-g09d2