diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelogexportdialog.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp index dec79113a..3204842ee 100644 --- a/desktop-widgets/divelogexportdialog.cpp +++ b/desktop-widgets/divelogexportdialog.cpp @@ -227,7 +227,15 @@ void exportProfile(const struct dive *dive, const QString filename) ProfileWidget2 *profile = MainWindow::instance()->graphics; profile->plotDive(dive, true, false, true); profile->setToolTipVisibile(false); - QPixmap pix = profile->grab(); + profile->setPrintMode(true); + double scale = profile->getFontPrintScale(); + profile->setFontPrintScale(4 * scale); + QImage image = QImage(profile->size() * 4, QImage::Format_RGB32); + QPainter paint; + paint.begin(&image); + profile->render(&paint); + image.save(filename); profile->setToolTipVisibile(true); - pix.save(filename); + profile->setFontPrintScale(scale); + profile->setPrintMode(false); } |