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

Side by Side Diff: experimental/PdfViewer/SkPdfType5ShadingDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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
1 #ifndef __DEFINED__SkPdfType5ShadingDictionary 1 #ifndef __DEFINED__SkPdfType5ShadingDictionary
2 #define __DEFINED__SkPdfType5ShadingDictionary 2 #define __DEFINED__SkPdfType5ShadingDictionary
3 3
4 #include "SkPdfEnums_autogen.h" 4 #include "SkPdfEnums_autogen.h"
5 #include "SkPdfArray_autogen.h" 5 #include "SkPdfArray_autogen.h"
6 #include "SkPdfShadingDictionary_autogen.h" 6 #include "SkPdfShadingDictionary_autogen.h"
7 7
8 // Additional entries specific to a type 5 shading dictionary
8 class SkPdfType5ShadingDictionary : public SkPdfShadingDictionary { 9 class SkPdfType5ShadingDictionary : public SkPdfShadingDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kType5ShadingDictionary_SkPdf ObjectType;} 11 virtual SkPdfObjectType getType() const { return kType5ShadingDictionary_SkPdf ObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType5Sh adingDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType5Sh adingDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return this;} 14 virtual SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return this;}
14 virtual const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {r eturn this;} 15 virtual const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {r eturn this;}
15 16
16 private: 17 private:
17 virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return NULL;} 18 virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return NULL;}
(...skipping 13 matching lines...) Expand all
31 32
32 public: 33 public:
33 private: 34 private:
34 public: 35 public:
35 SkPdfType5ShadingDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO bject* podofoObj = NULL) : SkPdfShadingDictionary(podofoDoc, podofoObj) {} 36 SkPdfType5ShadingDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO bject* podofoObj = NULL) : SkPdfShadingDictionary(podofoDoc, podofoObj) {}
36 37
37 virtual bool valid() const {return true;} 38 virtual bool valid() const {return true;}
38 39
39 SkPdfType5ShadingDictionary& operator=(const SkPdfType5ShadingDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;} 40 SkPdfType5ShadingDictionary& operator=(const SkPdfType5ShadingDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;}
40 41
42 /** (Required) The number of bits used to represent each vertex coordinate.
43 * Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
44 **/
45 bool has_BitsPerCoordinate() const {
46 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsP erCoordinate", "", NULL));
47 }
48
41 long BitsPerCoordinate() const { 49 long BitsPerCoordinate() const {
42 long ret; 50 long ret;
43 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoor dinate", "", &ret)) return ret; 51 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoor dinate", "", &ret)) return ret;
44 // TODO(edisonn): warn about missing required field, assert for known good p dfs 52 // TODO(edisonn): warn about missing required field, assert for known good p dfs
45 return 0; 53 return 0;
46 } 54 }
47 55
56 /** (Required) The number of bits used to represent each color component.
57 * Valid values are 1, 2, 4, 8, 12, and 16.
58 **/
59 bool has_BitsPerComponent() const {
60 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsP erComponent", "", NULL));
61 }
62
48 long BitsPerComponent() const { 63 long BitsPerComponent() const {
49 long ret; 64 long ret;
50 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComp onent", "", &ret)) return ret; 65 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComp onent", "", &ret)) return ret;
51 // TODO(edisonn): warn about missing required field, assert for known good p dfs 66 // TODO(edisonn): warn about missing required field, assert for known good p dfs
52 return 0; 67 return 0;
53 } 68 }
54 69
70 /** (Required) The number of vertices in each row of the lattice; the value
71 * must be greater than or equal to 2. The number of rows need not be
72 * specified.
73 **/
74 bool has_VerticesPerRow() const {
75 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Verti cesPerRow", "", NULL));
76 }
77
55 long VerticesPerRow() const { 78 long VerticesPerRow() const {
56 long ret; 79 long ret;
57 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "VerticesPer Row", "", &ret)) return ret; 80 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "VerticesPer Row", "", &ret)) return ret;
58 // TODO(edisonn): warn about missing required field, assert for known good p dfs 81 // TODO(edisonn): warn about missing required field, assert for known good p dfs
59 return 0; 82 return 0;
60 } 83 }
61 84
85 /** (Required) An array of numbers specifying how to map vertex coordinates
86 * and color components into the appropriate ranges of values. The de-
87 * coding method is similar to that used in image dictionaries (see "Decode
88 * Arrays" on page 271). The ranges are specified as follows:
89 * [ xmin xmax ymin ymax c1,min c1,max ... cn,min cn,max ]
90 * Note that only one pair of c values should be specified if a Function entry
91 * is present.
92 **/
93 bool has_Decode() const {
94 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decod e", "", NULL));
95 }
96
62 SkPdfArray Decode() const { 97 SkPdfArray Decode() const {
63 SkPdfArray ret; 98 SkPdfArray ret;
64 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", " ", &ret)) return ret; 99 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", " ", &ret)) return ret;
65 // TODO(edisonn): warn about missing required field, assert for known good p dfs 100 // TODO(edisonn): warn about missing required field, assert for known good p dfs
66 return SkPdfArray(); 101 return SkPdfArray();
67 } 102 }
68 103
104 /** (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions
105 * (where n is the number of color components in the shading dictionary's
106 * color space). If this entry is present, the color data for each vertex must be
107 * specified by a single parametric variable rather than by n separate color
108 * components; the designated function(s) will be called with each interpo-
109 * lated value of the parametric variable to determine the actual color at each
110 * point. Each input value will be forced into the range interval specified for
111 * the corresponding color component in the shading dictionary's Decode
112 * array. Each function's domain must be a superset of that interval. If the
113 * value returned by the function for a given color component is out of
114 * range, it will be adjusted to the nearest valid value.
115 * This entry may not be used with an Indexed color space.
116 **/
117 bool has_Function() const {
118 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct ion", "", NULL));
119 }
120
69 SkPdfFunction Function() const { 121 SkPdfFunction Function() const {
70 SkPdfFunction ret; 122 SkPdfFunction ret;
71 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functio n", "", &ret)) return ret; 123 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functio n", "", &ret)) return ret;
72 // TODO(edisonn): warn about missing required field, assert for known good p dfs 124 // TODO(edisonn): warn about missing required field, assert for known good p dfs
73 return SkPdfFunction(); 125 return SkPdfFunction();
74 } 126 }
75 127
76 }; 128 };
77 129
78 #endif // __DEFINED__SkPdfType5ShadingDictionary 130 #endif // __DEFINED__SkPdfType5ShadingDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698