diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-29 10:17:53 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-29 11:33:35 +0100 |
commit | 3eb588078e7f4d62053584a70f7600b19ec99a0f (patch) | |
tree | 432c6bfcabf44b8fdbc4a8e1ab58054e548a77bf /src/gui/painting/qpdf.cpp | |
parent | 7b8ab4204417844e72bb66696227a422f4ef3e2d (diff) | |
parent | 02ba93dd3dc640421c79c655064f0b2c4f1465cd (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r-- | src/gui/painting/qpdf.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 07a3caa51b..eed64180e5 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -2461,15 +2461,19 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti) trans.map(ti.width.toReal()/size, (ti.ascent.toReal()-ti.descent.toReal())/size, &x2, &y2); uint annot = addXrefEntry(-1); + QByteArray x1s, y1s, x2s, y2s; + x1s.setNum(static_cast<double>(x1), 'f'); + y1s.setNum(static_cast<double>(y1), 'f'); + x2s.setNum(static_cast<double>(x2), 'f'); + y2s.setNum(static_cast<double>(y2), 'f'); + QByteArray rectData = x1s + ' ' + y1s + ' ' + x2s + ' ' + y2s; + xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect ["); + xprintf(rectData.constData()); #ifdef Q_DEBUG_PDF_LINKS - xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect [%f %f %f %f]\n/Border [16 16 1]\n/A <<\n", + xprintf("]\n/Border [16 16 1]\n/A <<\n"); #else - xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect [%f %f %f %f]\n/Border [0 0 0]\n/A <<\n", + xprintf("]\n/Border [0 0 0]\n/A <<\n"); #endif - static_cast<double>(x1), - static_cast<double>(y1), - static_cast<double>(x2), - static_cast<double>(y2)); xprintf("/Type /Action\n/S /URI\n/URI (%s)\n", ti.charFormat.anchorHref().toLatin1().constData()); xprintf(">>\n>>\n"); |