OLD | NEW |
1 #ifndef __DEFINED__SkPdfTransparencyGroupDictionary | 1 #ifndef __DEFINED__SkPdfTransparencyGroupDictionary |
2 #define __DEFINED__SkPdfTransparencyGroupDictionary | 2 #define __DEFINED__SkPdfTransparencyGroupDictionary |
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 // Additional entries specific to a transparency group attributes dictionary | 9 // Additional entries specific to a transparency group attributes dictionary |
10 class SkPdfTransparencyGroupDictionary : public SkPdfDictionary { | 10 class SkPdfTransparencyGroupDictionary : public SkPdfDictionary { |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 SkPdfTransparencyGroupDictionary& operator=(const SkPdfTransparencyGroupDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 526 SkPdfTransparencyGroupDictionary& operator=(const SkPdfTransparencyGroupDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
527 | 527 |
528 /** (Required) The group subtype, which identifies the type of group whose at- | 528 /** (Required) The group subtype, which identifies the type of group whose at- |
529 * tributes this dictionary describes; must be Transparency for a transparency | 529 * tributes this dictionary describes; must be Transparency for a transparency |
530 * group. | 530 * group. |
531 **/ | 531 **/ |
532 bool has_S() const { | 532 bool has_S() const { |
533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); | 533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
534 } | 534 } |
535 | 535 |
536 std::string S() const { | 536 std::string S() const; |
537 std::string ret; | |
538 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | |
539 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
540 return ""; | |
541 } | |
542 | |
543 /** (Sometimes required, as discussed below) The group color space, which is use
d for | 537 /** (Sometimes required, as discussed below) The group color space, which is use
d for |
544 * the following purposes: | 538 * the following purposes: |
545 * * As the color space into which colors are converted when painted into the | 539 * * As the color space into which colors are converted when painted into the |
546 * group | 540 * group |
547 * * As the blending color space in which objects are composited within the gr
oup | 541 * * As the blending color space in which objects are composited within the gr
oup |
548 * (see Section 7.2.3, "Blending Color Space") | 542 * (see Section 7.2.3, "Blending Color Space") |
549 * * As the color space of the group as a whole when it in turn is painted as
an ob- | 543 * * As the color space of the group as a whole when it in turn is painted as
an ob- |
550 * ject onto its backdrop | 544 * ject onto its backdrop |
551 * The group color space may be any device or CIE-based color space that treats
its | 545 * The group color space may be any device or CIE-based color space that treats
its |
552 * components as independent additive or subtractive values in the range 0.0 to | 546 * components as independent additive or subtractive values in the range 0.0 to |
(...skipping 21 matching lines...) Expand all Loading... |
574 bool has_CS() const { | 568 bool has_CS() const { |
575 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS",
"", NULL)); | 569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS",
"", NULL)); |
576 } | 570 } |
577 | 571 |
578 bool isCSAName() const { | 572 bool isCSAName() const { |
579 SkPdfObject* ret = NULL; | 573 SkPdfObject* ret = NULL; |
580 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "",
&ret)) return false; | 574 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "",
&ret)) return false; |
581 return ret->podofo()->GetDataType() == ePdfDataType_Name; | 575 return ret->podofo()->GetDataType() == ePdfDataType_Name; |
582 } | 576 } |
583 | 577 |
584 std::string getCSAsName() const { | 578 std::string getCSAsName() const; |
585 std::string ret = ""; | |
586 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "", &r
et)) return ret; | |
587 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
588 return ""; | |
589 } | |
590 | |
591 bool isCSAArray() const { | 579 bool isCSAArray() const { |
592 SkPdfObject* ret = NULL; | 580 SkPdfObject* ret = NULL; |
593 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "",
&ret)) return false; | 581 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "",
&ret)) return false; |
594 return ret->podofo()->GetDataType() == ePdfDataType_Array; | 582 return ret->podofo()->GetDataType() == ePdfDataType_Array; |
595 } | 583 } |
596 | 584 |
597 SkPdfArray* getCSAsArray() const { | 585 SkPdfArray* getCSAsArray() const; |
598 SkPdfArray* ret = NULL; | |
599 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "", &
ret)) return ret; | |
600 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
601 return NULL; | |
602 } | |
603 | |
604 }; | 586 }; |
605 | 587 |
606 #endif // __DEFINED__SkPdfTransparencyGroupDictionary | 588 #endif // __DEFINED__SkPdfTransparencyGroupDictionary |
OLD | NEW |