OLD | NEW |
1 #ifndef __DEFINED__SkPdfCalrgbColorSpaceDictionary | 1 #ifndef __DEFINED__SkPdfCalrgbColorSpaceDictionary |
2 #define __DEFINED__SkPdfCalrgbColorSpaceDictionary | 2 #define __DEFINED__SkPdfCalrgbColorSpaceDictionary |
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 CalRGB color space dictionary |
8 class SkPdfCalrgbColorSpaceDictionary : public SkPdfDictionary { | 9 class SkPdfCalrgbColorSpaceDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kCalrgbColorSpaceDictionary_S
kPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kCalrgbColorSpaceDictionary_S
kPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCalrgbC
olorSpaceDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCalrgbC
olorSpaceDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() {retur
n this;} | 14 virtual SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() {retur
n this;} |
14 virtual const SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary()
const {return this;} | 15 virtual const SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary()
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 SkPdfCalrgbColorSpaceDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfCalrgbColorSpaceDictionary(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 SkPdfCalrgbColorSpaceDictionary& operator=(const SkPdfCalrgbColorSpaceDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} | 523 SkPdfCalrgbColorSpaceDictionary& operator=(const SkPdfCalrgbColorSpaceDictiona
ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb
j; return *this;} |
523 | 524 |
| 525 /** (Required) An array of three numbers [ XW YW ZW ] specifying the tristimulus
value, |
| 526 * in the CIE 1931 XYZ space, of the diffuse white point; see below for further
discus- |
| 527 * sion. The numbers XW and ZW must be positive, and YW must be equal to 1.0. |
| 528 **/ |
| 529 bool has_WhitePoint() const { |
| 530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "White
Point", "", NULL)); |
| 531 } |
| 532 |
524 SkPdfArray WhitePoint() const { | 533 SkPdfArray WhitePoint() const { |
525 SkPdfArray ret; | 534 SkPdfArray ret; |
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint
", "", &ret)) return ret; | 535 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint
", "", &ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 536 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return SkPdfArray(); | 537 return SkPdfArray(); |
529 } | 538 } |
530 | 539 |
| 540 /** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus
value, in |
| 541 * the CIE 1931 XYZ space, of the diffuse black point; see below for further di
scussion. |
| 542 * All three of these numbers must be nonnegative. Default value: [0.0 0.0 0.0]
. |
| 543 **/ |
| 544 bool has_BlackPoint() const { |
| 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Black
Point", "", NULL)); |
| 546 } |
| 547 |
531 SkPdfArray BlackPoint() const { | 548 SkPdfArray BlackPoint() const { |
532 SkPdfArray ret; | 549 SkPdfArray ret; |
533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint
", "", &ret)) return ret; | 550 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint
", "", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 551 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return SkPdfArray(); | 552 return SkPdfArray(); |
536 } | 553 } |
537 | 554 |
| 555 /** (Optional) An array of three numbers [ GR GG GB ] specifying the gamma for t
he red, |
| 556 * green, and blue (A, B, and C) components of the color space. Default value: |
| 557 * [1.0 1.0 1.0]. |
| 558 **/ |
| 559 bool has_Gamma() const { |
| 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma
", "", NULL)); |
| 561 } |
| 562 |
538 SkPdfArray Gamma() const { | 563 SkPdfArray Gamma() const { |
539 SkPdfArray ret; | 564 SkPdfArray ret; |
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", ""
, &ret)) return ret; | 565 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", ""
, &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return SkPdfArray(); | 567 return SkPdfArray(); |
543 } | 568 } |
544 | 569 |
| 570 /** (Optional) An array of nine numbers [ XA YA ZA XB YB ZB XC YC ZC ] specifyin
g |
| 571 * the linear interpretation of the decoded A, B, and C components of the color
space |
| 572 * with respect to the final XYZ representation. Default value: the identity ma
trix |
| 573 * [1 0 0 0 1 0 0 0 1]. |
| 574 **/ |
| 575 bool has_Matrix() const { |
| 576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matri
x", "", NULL)); |
| 577 } |
| 578 |
545 SkPdfArray Matrix() const { | 579 SkPdfArray Matrix() const { |
546 SkPdfArray ret; | 580 SkPdfArray ret; |
547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "
", &ret)) return ret; | 581 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "
", &ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 582 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return SkPdfArray(); | 583 return SkPdfArray(); |
550 } | 584 } |
551 | 585 |
552 }; | 586 }; |
553 | 587 |
554 #endif // __DEFINED__SkPdfCalrgbColorSpaceDictionary | 588 #endif // __DEFINED__SkPdfCalrgbColorSpaceDictionary |
OLD | NEW |