OLD | NEW |
(Empty) | |
| 1 #include "SkPdfType2FunctionDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkPdfArray* SkPdfType2FunctionDictionary::C0(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("C0", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 9 // TODO(edisonn): warn about missing default value for optional fields |
| 10 return NULL; |
| 11 } |
| 12 |
| 13 bool SkPdfType2FunctionDictionary::has_C0() const { |
| 14 return get("C0", "") != NULL; |
| 15 } |
| 16 |
| 17 SkPdfArray* SkPdfType2FunctionDictionary::C1(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("C1", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 21 // TODO(edisonn): warn about missing default value for optional fields |
| 22 return NULL; |
| 23 } |
| 24 |
| 25 bool SkPdfType2FunctionDictionary::has_C1() const { |
| 26 return get("C1", "") != NULL; |
| 27 } |
| 28 |
| 29 double SkPdfType2FunctionDictionary::N(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("N", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is
Reference())) return ret->numberValue(); |
| 33 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 34 return 0; |
| 35 } |
| 36 |
| 37 bool SkPdfType2FunctionDictionary::has_N() const { |
| 38 return get("N", "") != NULL; |
| 39 } |
| 40 |
OLD | NEW |