aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFFormFieldObjectHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-06-21 03:24:58 +0200
committerJay Berkenbilt <ejb@ql.org>2019-06-21 03:32:30 +0200
commit713d96199096680f9593e0d2cc53657eb8d27b46 (patch)
tree5f11c3b187ce10cd57c70dd4c32748a5f873dcb0 /libqpdf/QPDFFormFieldObjectHelper.cc
parente3129ef4323a8a0b6ecc0a711d5f5d1ca5fd0c56 (diff)
downloadqpdf-713d96199096680f9593e0d2cc53657eb8d27b46.tar.zst
Appearance streams: some floating point values were truncated
Bounding box X coordinates could be truncated, causing them to be off by a fraction of a point. This was most likely not visible, but it was still wrong.
Diffstat (limited to 'libqpdf/QPDFFormFieldObjectHelper.cc')
-rw-r--r--libqpdf/QPDFFormFieldObjectHelper.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDFFormFieldObjectHelper.cc b/libqpdf/QPDFFormFieldObjectHelper.cc
index 38755388..08042df2 100644
--- a/libqpdf/QPDFFormFieldObjectHelper.cc
+++ b/libqpdf/QPDFFormFieldObjectHelper.cc
@@ -676,10 +676,10 @@ ValueSetter::writeAppearance()
if (highlight)
{
write("q\n0.85 0.85 0.85 rg\n" +
- QUtil::int_to_string(bbox.llx) + " " +
+ QUtil::double_to_string(bbox.llx) + " " +
QUtil::double_to_string(bbox.lly + dy -
(tfh * (highlight_idx + 1))) + " " +
- QUtil::int_to_string(bbox.urx - bbox.llx) + " " +
+ QUtil::double_to_string(bbox.urx - bbox.llx) + " " +
QUtil::double_to_string(tfh) +
" re f\nQ\n");
}
@@ -693,7 +693,7 @@ ValueSetter::writeAppearance()
// which doesn't seem really worth the effort.
if (i == 0)
{
- write(QUtil::int_to_string(bbox.llx + dx) + " " +
+ write(QUtil::double_to_string(bbox.llx + dx) + " " +
QUtil::double_to_string(bbox.lly + dy) + " Td\n");
}
else