aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Real.cc
diff options
context:
space:
mode:
authorTobias Hoffmann <thobi@worker>2012-06-27 05:34:15 +0200
committerJay Berkenbilt <ejb@ql.org>2012-06-27 16:19:01 +0200
commit75054c0b9404572f2c1477858fe47a61404b72f5 (patch)
treed5c5dd17b0c6e8489d0e3ee92a6a5eab98990798 /libqpdf/QPDF_Real.cc
parent5b4aba20a261fb2e3a30b12d85edc0e0d367c45d (diff)
downloadqpdf-75054c0b9404572f2c1477858fe47a61404b72f5.tar.zst
Add QPDFObjectHandle::newReal(double)
Diffstat (limited to 'libqpdf/QPDF_Real.cc')
-rw-r--r--libqpdf/QPDF_Real.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libqpdf/QPDF_Real.cc b/libqpdf/QPDF_Real.cc
index 9236e92e..466ddb72 100644
--- a/libqpdf/QPDF_Real.cc
+++ b/libqpdf/QPDF_Real.cc
@@ -1,10 +1,17 @@
#include <qpdf/QPDF_Real.hh>
+#include <qpdf/QUtil.hh>
+
QPDF_Real::QPDF_Real(std::string const& val) :
val(val)
{
}
+QPDF_Real::QPDF_Real(double value, int decimal_places) :
+ val(QUtil::double_to_string(value, decimal_places))
+{
+}
+
QPDF_Real::~QPDF_Real()
{
}