| OLD | NEW |
| (Empty) |
| 1 #ifndef __DEFINED__SkPdfType1ShadingDictionary | |
| 2 #define __DEFINED__SkPdfType1ShadingDictionary | |
| 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 1 shading dictionary | |
| 10 class SkPdfType1ShadingDictionary : public SkPdfShadingDictionary { | |
| 11 public: | |
| 12 virtual SkPdfObjectType getType() const { return kType1ShadingDictionary_SkPdf
ObjectType;} | |
| 13 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType1Sh
adingDictionary_SkPdfObjectType + 1);} | |
| 14 public: | |
| 15 virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return this;} | |
| 16 virtual const SkPdfType1ShadingDictionary* asType1ShadingDictionary() const {r
eturn this;} | |
| 17 | |
| 18 private: | |
| 19 virtual SkPdfType2ShadingDictionary* asType2ShadingDictionary() {return NULL;} | |
| 20 virtual const SkPdfType2ShadingDictionary* asType2ShadingDictionary() const {r
eturn NULL;} | |
| 21 | |
| 22 virtual SkPdfType3ShadingDictionary* asType3ShadingDictionary() {return NULL;} | |
| 23 virtual const SkPdfType3ShadingDictionary* asType3ShadingDictionary() 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 SkPdfType1ShadingDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfShadingDictionary(podofoDoc, podofoObj) {} | |
| 38 | |
| 39 SkPdfType1ShadingDictionary(const SkPdfType1ShadingDictionary& from) : SkPdfSh
adingDictionary(from.fPodofoDoc, from.fPodofoObj) {} | |
| 40 | |
| 41 virtual bool valid() const {return true;} | |
| 42 | |
| 43 SkPdfType1ShadingDictionary& operator=(const SkPdfType1ShadingDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | |
| 44 | |
| 45 /** (Optional) An array of four numbers [ xmin xmax ymin ymax ] specifying the r
ec- | |
| 46 * tangular domain of coordinates over which the color function(s) are defined. | |
| 47 * Default value: [0.0 1.0 0.0 1.0]. | |
| 48 **/ | |
| 49 bool has_Domain() const { | |
| 50 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domai
n", "", NULL)); | |
| 51 } | |
| 52 | |
| 53 SkPdfArray* Domain() const; | |
| 54 /** (Optional) An array of six numbers specifying a transformation matrix mappin
g | |
| 55 * the coordinate space specified by the Domain entry into the shading's target
co- | |
| 56 * ordinate space. For example, to map the domain rectangle [0.0 1.0 0.0 1.0] t
o a | |
| 57 * 1-inch square with lower-left corner at coordinates (100, 100) in default us
er | |
| 58 * space, the Matrix value would be [72 0 0 72 100 100]. Default value: the ide
n- | |
| 59 * tity matrix [1 0 0 1 0 0]. | |
| 60 **/ | |
| 61 bool has_Matrix() const { | |
| 62 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matri
x", "", NULL)); | |
| 63 } | |
| 64 | |
| 65 SkPdfArray* Matrix() const; | |
| 66 /** (Required) A 2-in, n-out function or an array of n 2-in, 1-out functions (wh
ere n | |
| 67 * is the number of color components in the shading dictionary's color space). | |
| 68 * Each function's domain must be a superset of that of the shading dictionary.
If | |
| 69 * the value returned by the function for a given color component is out of ran
ge, it | |
| 70 * will be adjusted to the nearest valid value. | |
| 71 **/ | |
| 72 bool has_Function() const { | |
| 73 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct
ion", "", NULL)); | |
| 74 } | |
| 75 | |
| 76 SkPdfFunction Function() const; | |
| 77 }; | |
| 78 | |
| 79 #endif // __DEFINED__SkPdfType1ShadingDictionary | |
| OLD | NEW |