aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2018-04-27 17:26:02 -0400
committerZackaryWelch <welch.zackary@gmail.com>2018-04-27 17:26:02 -0400
commit253bacc6ee0d825564bef6aa507296e79b2611ff (patch)
tree0d87304383654f25f83259cdb0ae776706250c23 /src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
parentMerge branch 'master' of http://github.com/trueos/lumina (diff)
downloadlumina-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.cpp13
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);
}
bgstack15