blob: efec4a4124930277c9069a96d28cc46d03219849 [file] [log] [blame]
edisonn@google.com8cee7972013-08-20 18:56:49 +00001#include "SkPdfWebCaptureInformationDictionary_autogen.h"
2
3
4#include "SkPdfNativeDoc.h"
5double SkPdfWebCaptureInformationDictionary::V(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("V", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue();
9 // TODO(edisonn): warn about missing required field, assert for known good pdfs
10 return 0;
11}
12
13bool SkPdfWebCaptureInformationDictionary::has_V() const {
14 return get("V", "") != NULL;
15}
16
17SkPdfArray* SkPdfWebCaptureInformationDictionary::C(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("C", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret;
21 // TODO(edisonn): warn about missing default value for optional fields
22 return NULL;
23}
24
25bool SkPdfWebCaptureInformationDictionary::has_C() const {
26 return get("C", "") != NULL;
27}