diff options
author | Vincent Sanders <vince@kyllikki.org> | 2018-01-23 22:56:24 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2018-01-23 22:56:24 +0000 |
commit | 04517ee5560353cab1ecf5d24a1cb6301d3a8b05 (patch) | |
tree | 5fa1cf66a8bb751a93e0fdf905d712110a4af077 /src/cos_object.h | |
parent | 3fe413e5838eaf9d8bc30a9a49f0d7707e84db35 (diff) | |
download | libnspdf-04517ee5560353cab1ecf5d24a1cb6301d3a8b05.tar.gz libnspdf-04517ee5560353cab1ecf5d24a1cb6301d3a8b05.tar.bz2 |
rename cos object name entry
Diffstat (limited to 'src/cos_object.h')
-rw-r--r-- | src/cos_object.h | 17 |
1 files changed, 16 insertions, 1 deletions
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; @@ -200,6 +200,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. * * Get the value from a cos object, if the object is an object reference it |