From 04517ee5560353cab1ecf5d24a1cb6301d3a8b05 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 23 Jan 2018 22:56:24 +0000 Subject: rename cos object name entry --- src/cos_object.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/cos_object.h') diff --git a/src/cos_object.h b/src/cos_object.h index c5b85fa..56c2179 100644 --- a/src/cos_object.h +++ b/src/cos_object.h @@ -101,7 +101,7 @@ struct cos_object { float real; /** name */ - char *n; + char *name; /** string */ struct cos_string *s; @@ -199,6 +199,21 @@ nspdferror cos_get_array_dictionary(struct nspdf_doc *doc, struct cos_object *ar */ nspdferror cos_get_int(struct nspdf_doc *doc, struct cos_object *cobj, int64_t *value_out); +/** + * get the float value of a cos object. + * + * Get the value from a cos object, if the object is an object reference it + * will be dereferenced first. The dereferencing will parse any previously + * unreferenced indirect objects as required. + * + * \param doc The document the cos object belongs to. + * \param cobj A cos object of integer type. + * \param value_out The result value. + * \return NSERROR_OK and \p value_out updated, + * NSERROR_TYPE if the \p cobj is not an integer + */ +nspdferror cos_get_number(struct nspdf_doc *doc, struct cos_object *cobj, float *value_out); + /** * get the name value of a cos object. * -- cgit v1.2.3