OLD | NEW |
1 #ifndef __DEFINED__SkPdfType2ShadingDictionary | 1 #ifndef __DEFINED__SkPdfType2ShadingDictionary |
2 #define __DEFINED__SkPdfType2ShadingDictionary | 2 #define __DEFINED__SkPdfType2ShadingDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfShadingDictionary_autogen.h" | 7 #include "SkPdfShadingDictionary_autogen.h" |
8 | 8 |
9 // Additional entries specific to a type 2 shading dictionary | 9 // Additional entries specific to a type 2 shading dictionary |
10 class SkPdfType2ShadingDictionary : public SkPdfShadingDictionary { | 10 class SkPdfType2ShadingDictionary : public SkPdfShadingDictionary { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 SkPdfType2ShadingDictionary& operator=(const SkPdfType2ShadingDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 43 SkPdfType2ShadingDictionary& operator=(const SkPdfType2ShadingDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
44 | 44 |
45 /** (Required) An array of four numbers [ x0 y0 x1 y1 ] specifying the starting
and | 45 /** (Required) An array of four numbers [ x0 y0 x1 y1 ] specifying the starting
and |
46 * ending coordinates of the axis, expressed in the shading's target coordinate | 46 * ending coordinates of the axis, expressed in the shading's target coordinate |
47 * space. | 47 * space. |
48 **/ | 48 **/ |
49 bool has_Coords() const { | 49 bool has_Coords() const { |
50 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coord
s", "", NULL)); | 50 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coord
s", "", NULL)); |
51 } | 51 } |
52 | 52 |
53 SkPdfArray* Coords() const { | 53 SkPdfArray* Coords() const; |
54 SkPdfArray* ret; | |
55 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coords", "
", &ret)) return ret; | |
56 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
57 return NULL; | |
58 } | |
59 | |
60 /** (Optional) An array of two numbers [ t0 t1 ] specifying the limiting values
of a | 54 /** (Optional) An array of two numbers [ t0 t1 ] specifying the limiting values
of a |
61 * parametric variable t. The variable is considered to vary linearly between t
hese | 55 * parametric variable t. The variable is considered to vary linearly between t
hese |
62 * two values as the color gradient varies between the starting and ending poin
ts of | 56 * two values as the color gradient varies between the starting and ending poin
ts of |
63 * the axis. The variable t becomes the input argument to the color function(s)
. | 57 * the axis. The variable t becomes the input argument to the color function(s)
. |
64 * Default value: [0.0 1.0]. | 58 * Default value: [0.0 1.0]. |
65 **/ | 59 **/ |
66 bool has_Domain() const { | 60 bool has_Domain() const { |
67 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domai
n", "", NULL)); | 61 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domai
n", "", NULL)); |
68 } | 62 } |
69 | 63 |
70 SkPdfArray* Domain() const { | 64 SkPdfArray* Domain() const; |
71 SkPdfArray* ret; | |
72 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "
", &ret)) return ret; | |
73 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
74 return NULL; | |
75 } | |
76 | |
77 /** (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (wh
ere n | 65 /** (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (wh
ere n |
78 * is the number of color components in the shading dictionary's color space).
The | 66 * is the number of color components in the shading dictionary's color space).
The |
79 * function(s) are called with values of the parametric variable t in the domai
n de- | 67 * function(s) are called with values of the parametric variable t in the domai
n de- |
80 * fined by the Domain entry. Each function's domain must be a superset of that
of | 68 * fined by the Domain entry. Each function's domain must be a superset of that
of |
81 * the shading dictionary. If the value returned by the function for a given co
lor | 69 * the shading dictionary. If the value returned by the function for a given co
lor |
82 * component is out of range, it will be adjusted to the nearest valid value. | 70 * component is out of range, it will be adjusted to the nearest valid value. |
83 **/ | 71 **/ |
84 bool has_Function() const { | 72 bool has_Function() const { |
85 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct
ion", "", NULL)); | 73 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct
ion", "", NULL)); |
86 } | 74 } |
87 | 75 |
88 SkPdfFunction Function() const { | 76 SkPdfFunction Function() const; |
89 SkPdfFunction ret; | |
90 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functio
n", "", &ret)) return ret; | |
91 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
92 return SkPdfFunction(); | |
93 } | |
94 | |
95 /** (Optional) An array of two boolean values specifying whether to extend the | 77 /** (Optional) An array of two boolean values specifying whether to extend the |
96 * shading beyond the starting and ending points of the axis, respectively. Def
ault | 78 * shading beyond the starting and ending points of the axis, respectively. Def
ault |
97 * value: [false false]. | 79 * value: [false false]. |
98 **/ | 80 **/ |
99 bool has_Extend() const { | 81 bool has_Extend() const { |
100 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Exten
d", "", NULL)); | 82 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Exten
d", "", NULL)); |
101 } | 83 } |
102 | 84 |
103 SkPdfArray* Extend() const { | 85 SkPdfArray* Extend() const; |
104 SkPdfArray* ret; | |
105 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Extend", "
", &ret)) return ret; | |
106 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
107 return NULL; | |
108 } | |
109 | |
110 }; | 86 }; |
111 | 87 |
112 #endif // __DEFINED__SkPdfType2ShadingDictionary | 88 #endif // __DEFINED__SkPdfType2ShadingDictionary |
OLD | NEW |