| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfCalgrayColorSpaceDictionary | 1 #ifndef __DEFINED__SkPdfCalgrayColorSpaceDictionary |
| 2 #define __DEFINED__SkPdfCalgrayColorSpaceDictionary | 2 #define __DEFINED__SkPdfCalgrayColorSpaceDictionary |
| 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 // Entries in a CalGray color space dictionary |
| 8 class SkPdfCalgrayColorSpaceDictionary : public SkPdfDictionary { | 9 class SkPdfCalgrayColorSpaceDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kCalgrayColorSpaceDictionary_
SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kCalgrayColorSpaceDictionary_
SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCalgray
ColorSpaceDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCalgray
ColorSpaceDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() {ret
urn this;} | 14 virtual SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() {ret
urn this;} |
| 14 virtual const SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary(
) const {return this;} | 15 virtual const SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary(
) 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 SkPdfCalgrayColorSpaceDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfCalgrayColorSpaceDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfCalgrayColorSpaceDictionary& operator=(const SkPdfCalgrayColorSpaceDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 523 SkPdfCalgrayColorSpaceDictionary& operator=(const SkPdfCalgrayColorSpaceDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
| 523 | 524 |
| 525 /** (Required) An array of three numbers [XW YW ZW ] specifying the tri- |
| 526 * stimulus value, in the CIE 1931 XYZ space, of the diffuse white point; see |
| 527 * "CalRGB Color Spaces," below, for further discussion. The numbers XW and |
| 528 * ZW must be positive, and YW must be equal to 1.0. |
| 529 **/ |
| 530 bool has_WhitePoint() const { |
| 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "White
Point", "", NULL)); |
| 532 } |
| 533 |
| 524 SkPdfArray WhitePoint() const { | 534 SkPdfArray WhitePoint() const { |
| 525 SkPdfArray ret; | 535 SkPdfArray ret; |
| 526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint
", "", &ret)) return ret; | 536 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint
", "", &ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 537 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return SkPdfArray(); | 538 return SkPdfArray(); |
| 529 } | 539 } |
| 530 | 540 |
| 541 /** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus |
| 542 * value, in the CIE 1931 XYZ space, of the diffuse black point; see "CalRGB |
| 543 * Color Spaces," below, for further discussion. All three of these numbers mus
t |
| 544 * be nonnegative. Default value: [0.0 0.0 0.0]. |
| 545 **/ |
| 546 bool has_BlackPoint() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Black
Point", "", NULL)); |
| 548 } |
| 549 |
| 531 SkPdfArray BlackPoint() const { | 550 SkPdfArray BlackPoint() const { |
| 532 SkPdfArray ret; | 551 SkPdfArray ret; |
| 533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint
", "", &ret)) return ret; | 552 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint
", "", &ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return SkPdfArray(); | 554 return SkPdfArray(); |
| 536 } | 555 } |
| 537 | 556 |
| 557 /** (Optional) A number G defining the gamma for the gray (A) component. G |
| 558 * must be positive and will generally be greater than or equal to 1. Default |
| 559 * value: 1. |
| 560 **/ |
| 561 bool has_Gamma() const { |
| 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma
", "", NULL)); |
| 563 } |
| 564 |
| 538 double Gamma() const { | 565 double Gamma() const { |
| 539 double ret; | 566 double ret; |
| 540 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "
", &ret)) return ret; | 567 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "
", &ret)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return 0; | 569 return 0; |
| 543 } | 570 } |
| 544 | 571 |
| 545 }; | 572 }; |
| 546 | 573 |
| 547 #endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary | 574 #endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary |
| OLD | NEW |