OLD | NEW |
1 #ifndef __DEFINED__SkPdfSoftMaskImageDictionary | 1 #ifndef __DEFINED__SkPdfSoftMaskImageDictionary |
2 #define __DEFINED__SkPdfSoftMaskImageDictionary | 2 #define __DEFINED__SkPdfSoftMaskImageDictionary |
3 | 3 |
4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
7 | 7 |
| 8 // Additional entry in a soft-mask image dictionary |
8 class SkPdfSoftMaskImageDictionary : public SkPdfDictionary { | 9 class SkPdfSoftMaskImageDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kSoftMaskImageDictionary_SkPd
fObjectType;} | 11 virtual SkPdfObjectType getType() const { return kSoftMaskImageDictionary_SkPd
fObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSoftMas
kImageDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSoftMas
kImageDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() {return this
;} | 14 virtual SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() {return this
;} |
14 virtual const SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() const
{return this;} | 15 virtual const SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() const
{return this;} |
15 | 16 |
16 private: | 17 private: |
17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 515 |
515 public: | 516 public: |
516 private: | 517 private: |
517 public: | 518 public: |
518 SkPdfSoftMaskImageDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf
Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfSoftMaskImageDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf
Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfSoftMaskImageDictionary& operator=(const SkPdfSoftMaskImageDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} | 523 SkPdfSoftMaskImageDictionary& operator=(const SkPdfSoftMaskImageDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} |
523 | 524 |
| 525 /** (Optional; PDF 1.4) An array of component values specifying the matte color
with |
| 526 * which the image data in the parent image has been preblended. The array cons
ists of n |
| 527 * numbers, where n is the number of components in the color space specified by
the |
| 528 * ColorSpace entry in the parent image's image dictionary; the numbers must be
valid |
| 529 * color components in that color space. If this entry is absent, the image dat
a is not pre- |
| 530 * blended. |
| 531 **/ |
| 532 bool has_Matte() const { |
| 533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matte
", "", NULL)); |
| 534 } |
| 535 |
524 SkPdfArray Matte() const { | 536 SkPdfArray Matte() const { |
525 SkPdfArray ret; | 537 SkPdfArray ret; |
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matte", ""
, &ret)) return ret; | 538 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matte", ""
, &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 539 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return SkPdfArray(); | 540 return SkPdfArray(); |
529 } | 541 } |
530 | 542 |
531 }; | 543 }; |
532 | 544 |
533 #endif // __DEFINED__SkPdfSoftMaskImageDictionary | 545 #endif // __DEFINED__SkPdfSoftMaskImageDictionary |
OLD | NEW |