| OLD | NEW |
| (Empty) |
| 1 #ifndef __DEFINED__SkPdfType3ShadingDictionary | |
| 2 #define __DEFINED__SkPdfType3ShadingDictionary | |
| 3 | |
| 4 #include "SkPdfUtils.h" | |
| 5 #include "SkPdfEnums_autogen.h" | |
| 6 #include "SkPdfArray_autogen.h" | |
| 7 #include "SkPdfShadingDictionary_autogen.h" | |
| 8 | |
| 9 // Additional entries specific to a type 3 shading dictionary | |
| 10 class SkPdfType3ShadingDictionary : public SkPdfShadingDictionary { | |
| 11 public: | |
| 12 virtual SkPdfObjectType getType() const { return kType3ShadingDictionary_SkPdf
ObjectType;} | |
| 13 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType3Sh
adingDictionary_SkPdfObjectType + 1);} | |
| 14 public: | |
| 15 virtual SkPdfType3ShadingDictionary* asType3ShadingDictionary() {return this;} | |
| 16 virtual const SkPdfType3ShadingDictionary* asType3ShadingDictionary() const {r
eturn this;} | |
| 17 | |
| 18 private: | |
| 19 virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return NULL;} | |
| 20 virtual const SkPdfType1ShadingDictionary* asType1ShadingDictionary() const {r
eturn NULL;} | |
| 21 | |
| 22 virtual SkPdfType2ShadingDictionary* asType2ShadingDictionary() {return NULL;} | |
| 23 virtual const SkPdfType2ShadingDictionary* asType2ShadingDictionary() const {r
eturn NULL;} | |
| 24 | |
| 25 virtual SkPdfType4ShadingDictionary* asType4ShadingDictionary() {return NULL;} | |
| 26 virtual const SkPdfType4ShadingDictionary* asType4ShadingDictionary() const {r
eturn NULL;} | |
| 27 | |
| 28 virtual SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return NULL;} | |
| 29 virtual const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {r
eturn NULL;} | |
| 30 | |
| 31 virtual SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return NULL;} | |
| 32 virtual const SkPdfType6ShadingDictionary* asType6ShadingDictionary() const {r
eturn NULL;} | |
| 33 | |
| 34 public: | |
| 35 private: | |
| 36 public: | |
| 37 SkPdfType3ShadingDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfShadingDictionary(podofoDoc, podofoObj) {} | |
| 38 | |
| 39 SkPdfType3ShadingDictionary(const SkPdfType3ShadingDictionary& from) : SkPdfSh
adingDictionary(from.fPodofoDoc, from.fPodofoObj) {} | |
| 40 | |
| 41 virtual bool valid() const {return true;} | |
| 42 | |
| 43 SkPdfType3ShadingDictionary& operator=(const SkPdfType3ShadingDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | |
| 44 | |
| 45 /** (Required) An array of six numbers [ x0 y0 r0 x1 y1 r1 ] specifying the cent
ers and | |
| 46 * radii of the starting and ending circles, expressed in the shading's target
coor- | |
| 47 * dinate space. The radii r0 and r1 must both be greater than or equal to 0. I
f one | |
| 48 * radius is 0, the corresponding circle is treated as a point; if both are 0,
nothing is | |
| 49 * painted. | |
| 50 **/ | |
| 51 bool has_Coords() const { | |
| 52 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coord
s", "", NULL)); | |
| 53 } | |
| 54 | |
| 55 SkPdfArray* Coords() const; | |
| 56 /** (Optional) An array of two numbers [ t0 t1 ] specifying the limiting values
of a | |
| 57 * parametric variable t. The variable is considered to vary linearly between t
hese | |
| 58 * two values as the color gradient varies between the starting and ending circ
les. | |
| 59 * The variable t becomes the input argument to the color function(s). Default | |
| 60 * value: [0.0 1.0]. | |
| 61 **/ | |
| 62 bool has_Domain() const { | |
| 63 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domai
n", "", NULL)); | |
| 64 } | |
| 65 | |
| 66 SkPdfArray* Domain() const; | |
| 67 /** (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (wh
ere n | |
| 68 * is the number of color components in the shading dictionary's color space).
The | |
| 69 * function(s) are called with values of the parametric variable t in the domai
n de- | |
| 70 * fined by the shading dictionary's Domain entry. Each function's domain must
be | |
| 71 * a superset of that of the shading dictionary. If the value returned by the f
unction | |
| 72 * for a given color component is out of range, it will be adjusted to the near
est | |
| 73 * valid value. | |
| 74 **/ | |
| 75 bool has_Function() const { | |
| 76 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct
ion", "", NULL)); | |
| 77 } | |
| 78 | |
| 79 SkPdfFunction Function() const; | |
| 80 /** (Optional) An array of two boolean values specifying whether to extend the | |
| 81 * shading beyond the starting and ending circles, respectively. Default value: | |
| 82 * [false false]. | |
| 83 **/ | |
| 84 bool has_Extend() const { | |
| 85 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Exten
d", "", NULL)); | |
| 86 } | |
| 87 | |
| 88 SkPdfArray* Extend() const; | |
| 89 }; | |
| 90 | |
| 91 #endif // __DEFINED__SkPdfType3ShadingDictionary | |
| OLD | NEW |