Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoftMaskDictionary_autogen.cpp

Issue 22900010: pdfviewer: check in pdfapi classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #include "SkPdfSoftMaskDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfSoftMaskDictionary::Type(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("Type", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
9 // TODO(edisonn): warn about missing default value for optional fields
10 return SkString();
11 }
12
13 bool SkPdfSoftMaskDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfSoftMaskDictionary::S(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("S", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
21 // TODO(edisonn): warn about missing required field, assert for known good pdf s
22 return SkString();
23 }
24
25 bool SkPdfSoftMaskDictionary::has_S() const {
26 return get("S", "") != NULL;
27 }
28
29 SkPdfStream* SkPdfSoftMaskDictionary::G(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("G", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
33 // TODO(edisonn): warn about missing required field, assert for known good pdf s
34 return NULL;
35 }
36
37 bool SkPdfSoftMaskDictionary::has_G() const {
38 return get("G", "") != NULL;
39 }
40
41 SkPdfArray* SkPdfSoftMaskDictionary::BC(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("BC", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
45 // TODO(edisonn): warn about missing default value for optional fields
46 return NULL;
47 }
48
49 bool SkPdfSoftMaskDictionary::has_BC() const {
50 return get("BC", "") != NULL;
51 }
52
53 bool SkPdfSoftMaskDictionary::isTRAFunction(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("TR", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 return ret != NULL && ret->isFunction();
57 }
58
59 SkPdfFunction SkPdfSoftMaskDictionary::getTRAsFunction(SkPdfNativeDoc* doc) {
60 SkPdfNativeObject* ret = get("TR", "");
61 if (doc) {ret = doc->resolveReference(ret);}
62 if ((ret != NULL && ret->isFunction()) || (doc == NULL && ret != NULL && ret-> isReference())) return ret->functionValue();
63 // TODO(edisonn): warn about missing default value for optional fields
64 return SkPdfFunction();
65 }
66
67 bool SkPdfSoftMaskDictionary::isTRAName(SkPdfNativeDoc* doc) {
68 SkPdfNativeObject* ret = get("TR", "");
69 if (doc) {ret = doc->resolveReference(ret);}
70 return ret != NULL && ret->isName();
71 }
72
73 SkString SkPdfSoftMaskDictionary::getTRAsName(SkPdfNativeDoc* doc) {
74 SkPdfNativeObject* ret = get("TR", "");
75 if (doc) {ret = doc->resolveReference(ret);}
76 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
77 // TODO(edisonn): warn about missing default value for optional fields
78 return SkString();
79 }
80
81 bool SkPdfSoftMaskDictionary::has_TR() const {
82 return get("TR", "") != NULL;
83 }
84
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698