OLD | NEW |
(Empty) | |
| 1 #include "SkPdfInlineLevelStructureElementsDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 bool SkPdfInlineLevelStructureElementsDictionary::isLineHeightANumber(SkPdfNativ
eDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("LineHeight", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 return ret != NULL && ret->isNumber(); |
| 9 } |
| 10 |
| 11 double SkPdfInlineLevelStructureElementsDictionary::getLineHeightAsNumber(SkPdfN
ativeDoc* doc) { |
| 12 SkPdfNativeObject* ret = get("LineHeight", ""); |
| 13 if (doc) {ret = doc->resolveReference(ret);} |
| 14 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is
Reference())) return ret->numberValue(); |
| 15 // TODO(edisonn): warn about missing default value for optional fields |
| 16 return 0; |
| 17 } |
| 18 |
| 19 bool SkPdfInlineLevelStructureElementsDictionary::isLineHeightAName(SkPdfNativeD
oc* doc) { |
| 20 SkPdfNativeObject* ret = get("LineHeight", ""); |
| 21 if (doc) {ret = doc->resolveReference(ret);} |
| 22 return ret != NULL && ret->isName(); |
| 23 } |
| 24 |
| 25 SkString SkPdfInlineLevelStructureElementsDictionary::getLineHeightAsName(SkPdfN
ativeDoc* doc) { |
| 26 SkPdfNativeObject* ret = get("LineHeight", ""); |
| 27 if (doc) {ret = doc->resolveReference(ret);} |
| 28 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 29 // TODO(edisonn): warn about missing default value for optional fields |
| 30 return SkString(); |
| 31 } |
| 32 |
| 33 bool SkPdfInlineLevelStructureElementsDictionary::has_LineHeight() const { |
| 34 return get("LineHeight", "") != NULL; |
| 35 } |
| 36 |
OLD | NEW |