OLD | NEW |
1 #ifndef __DEFINED__SkPdfCalgrayColorSpaceDictionary | 1 #ifndef __DEFINED__SkPdfCalgrayColorSpaceDictionary |
2 #define __DEFINED__SkPdfCalgrayColorSpaceDictionary | 2 #define __DEFINED__SkPdfCalgrayColorSpaceDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
8 | 8 |
9 // Entries in a CalGray color space dictionary | 9 // Entries in a CalGray color space dictionary |
10 class SkPdfCalgrayColorSpaceDictionary : public SkPdfDictionary { | 10 class SkPdfCalgrayColorSpaceDictionary : public SkPdfDictionary { |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 527 |
528 /** (Required) An array of three numbers [XW YW ZW ] specifying the tri- | 528 /** (Required) An array of three numbers [XW YW ZW ] specifying the tri- |
529 * stimulus value, in the CIE 1931 XYZ space, of the diffuse white point; see | 529 * stimulus value, in the CIE 1931 XYZ space, of the diffuse white point; see |
530 * "CalRGB Color Spaces," below, for further discussion. The numbers XW and | 530 * "CalRGB Color Spaces," below, for further discussion. The numbers XW and |
531 * ZW must be positive, and YW must be equal to 1.0. | 531 * ZW must be positive, and YW must be equal to 1.0. |
532 **/ | 532 **/ |
533 bool has_WhitePoint() const { | 533 bool has_WhitePoint() const { |
534 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "White
Point", "", NULL)); | 534 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "White
Point", "", NULL)); |
535 } | 535 } |
536 | 536 |
537 SkPdfArray* WhitePoint() const { | 537 SkPdfArray* WhitePoint() const; |
538 SkPdfArray* ret; | |
539 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint
", "", &ret)) return ret; | |
540 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
541 return NULL; | |
542 } | |
543 | |
544 /** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus | 538 /** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus |
545 * value, in the CIE 1931 XYZ space, of the diffuse black point; see "CalRGB | 539 * value, in the CIE 1931 XYZ space, of the diffuse black point; see "CalRGB |
546 * Color Spaces," below, for further discussion. All three of these numbers mus
t | 540 * Color Spaces," below, for further discussion. All three of these numbers mus
t |
547 * be nonnegative. Default value: [0.0 0.0 0.0]. | 541 * be nonnegative. Default value: [0.0 0.0 0.0]. |
548 **/ | 542 **/ |
549 bool has_BlackPoint() const { | 543 bool has_BlackPoint() const { |
550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Black
Point", "", NULL)); | 544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Black
Point", "", NULL)); |
551 } | 545 } |
552 | 546 |
553 SkPdfArray* BlackPoint() const { | 547 SkPdfArray* BlackPoint() const; |
554 SkPdfArray* ret; | |
555 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint
", "", &ret)) return ret; | |
556 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
557 return NULL; | |
558 } | |
559 | |
560 /** (Optional) A number G defining the gamma for the gray (A) component. G | 548 /** (Optional) A number G defining the gamma for the gray (A) component. G |
561 * must be positive and will generally be greater than or equal to 1. Default | 549 * must be positive and will generally be greater than or equal to 1. Default |
562 * value: 1. | 550 * value: 1. |
563 **/ | 551 **/ |
564 bool has_Gamma() const { | 552 bool has_Gamma() const { |
565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma
", "", NULL)); | 553 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma
", "", NULL)); |
566 } | 554 } |
567 | 555 |
568 double Gamma() const { | 556 double Gamma() const; |
569 double ret; | |
570 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "
", &ret)) return ret; | |
571 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
572 return 0; | |
573 } | |
574 | |
575 }; | 557 }; |
576 | 558 |
577 #endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary | 559 #endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary |
OLD | NEW |