diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2018-04-27 17:26:02 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2018-04-27 17:26:02 -0400 |
commit | 253bacc6ee0d825564bef6aa507296e79b2611ff (patch) | |
tree | 0d87304383654f25f83259cdb0ae776706250c23 /src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | |
parent | Merge branch 'master' of http://github.com/trueos/lumina (diff) | |
download | lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.tar.gz lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.tar.bz2 lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.zip |
Added more annotation and widget support. Currently incomplete. Updated to MuPDF 1.13.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp index aa80489d..3d308b2f 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp @@ -484,6 +484,19 @@ void MainUI::paintToPrinter(QPrinter *PRINTER){ QImage img = BACKEND->imageHash(pageCount[i]).scaled(sz, Qt::KeepAspectRatio, Qt::SmoothTransformation); //Now draw the image painter.drawImage(0,0,img); + //Also paint the annotations at their locations + for(int k = 0; k < BACKEND->annotSize(i); k++) { + Annotation *annot = BACKEND->annotList(i, k); + if(annot->print()) { + if(annot->getType() == 14) { + painter.setPen(QPen(annot->getColor())); + foreach(QVector<QPointF> pointList, annot->getInkList()) + painter.drawLines(pointList); + }else{ + painter.drawImage(annot->getLoc(), annot->renderImage()); + } + } + } } progAct->setVisible(false); } |