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

Side by Side Diff: experimental/PdfViewer/SkPdfType6ShadingDictionary_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__SkPdfType6ShadingDictionary 1 #ifndef __DEFINED__SkPdfType6ShadingDictionary
2 #define __DEFINED__SkPdfType6ShadingDictionary 2 #define __DEFINED__SkPdfType6ShadingDictionary
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 6 shading dictionary
8 class SkPdfType6ShadingDictionary : public SkPdfShadingDictionary { 9 class SkPdfType6ShadingDictionary : public SkPdfShadingDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kType6ShadingDictionary_SkPdf ObjectType;} 11 virtual SkPdfObjectType getType() const { return kType6ShadingDictionary_SkPdf ObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType6Sh adingDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType6Sh adingDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return this;} 14 virtual SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return this;}
14 virtual const SkPdfType6ShadingDictionary* asType6ShadingDictionary() const {r eturn this;} 15 virtual const SkPdfType6ShadingDictionary* asType6ShadingDictionary() 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 SkPdfType6ShadingDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO bject* podofoObj = NULL) : SkPdfShadingDictionary(podofoDoc, podofoObj) {} 36 SkPdfType6ShadingDictionary(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 SkPdfType6ShadingDictionary& operator=(const SkPdfType6ShadingDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;} 40 SkPdfType6ShadingDictionary& operator=(const SkPdfType6ShadingDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;}
40 41
42 /** (Required) The number of bits used to represent each geometric coordi-
43 * nate. 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 bits used to represent the edge flag for each
71 * patch (see below). Valid values of BitsPerFlag are 2, 4, and 8, but only the
72 * least significant 2 bits in each flag value are used. Valid values for the e dge
73 * flag itself are 0, 1, 2, and 3.
74 **/
75 bool has_BitsPerFlag() const {
76 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsP erFlag", "", NULL));
77 }
78
55 long BitsPerFlag() const { 79 long BitsPerFlag() const {
56 long ret; 80 long ret;
57 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerFlag ", "", &ret)) return ret; 81 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerFlag ", "", &ret)) return ret;
58 // TODO(edisonn): warn about missing required field, assert for known good p dfs 82 // TODO(edisonn): warn about missing required field, assert for known good p dfs
59 return 0; 83 return 0;
60 } 84 }
61 85
86 /** (Required) An array of numbers specifying how to map coordinates and
87 * color components into the appropriate ranges of values. The decoding
88 * method is similar to that used in image dictionaries (see "Decode Arrays"
89 * on page 271). The ranges are specified as follows:
90 * [ xmin xmax ymin ymax c1,min c1,max ... cn,min cn,max ]
91 * Note that only one pair of c values should be specified if a Function entry
92 * is present.
93 **/
94 bool has_Decode() const {
95 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decod e", "", NULL));
96 }
97
62 SkPdfArray Decode() const { 98 SkPdfArray Decode() const {
63 SkPdfArray ret; 99 SkPdfArray ret;
64 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", " ", &ret)) return ret; 100 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", " ", &ret)) return ret;
65 // TODO(edisonn): warn about missing required field, assert for known good p dfs 101 // TODO(edisonn): warn about missing required field, assert for known good p dfs
66 return SkPdfArray(); 102 return SkPdfArray();
67 } 103 }
68 104
105 /** (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions
106 * (where n is the number of color components in the shading dictionary's
107 * color space). If this entry is present, the color data for each vertex must be
108 * specified by a single parametric variable rather than by n separate color
109 * components; the designated function(s) will be called with each interpo-
110 * lated value of the parametric variable to determine the actual color at each
111 * point. Each input value will be forced into the range interval specified for
112 * the corresponding color component in the shading dictionary's Decode
113 * array. Each function's domain must be a superset of that interval. If the
114 * value returned by the function for a given color component is out of
115 * range, it will be adjusted to the nearest valid value.
116 * This entry may not be used with an Indexed color space.
117 **/
118 bool has_Function() const {
119 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct ion", "", NULL));
120 }
121
69 SkPdfFunction Function() const { 122 SkPdfFunction Function() const {
70 SkPdfFunction ret; 123 SkPdfFunction ret;
71 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functio n", "", &ret)) return ret; 124 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functio n", "", &ret)) return ret;
72 // TODO(edisonn): warn about missing required field, assert for known good p dfs 125 // TODO(edisonn): warn about missing required field, assert for known good p dfs
73 return SkPdfFunction(); 126 return SkPdfFunction();
74 } 127 }
75 128
76 }; 129 };
77 130
78 #endif // __DEFINED__SkPdfType6ShadingDictionary 131 #endif // __DEFINED__SkPdfType6ShadingDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698