OLD | NEW |
1 #ifndef __DEFINED__SkPdfTrapNetworkAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfTrapNetworkAnnotationDictionary |
2 #define __DEFINED__SkPdfTrapNetworkAnnotationDictionary | 2 #define __DEFINED__SkPdfTrapNetworkAnnotationDictionary |
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 trap network annotation | 9 // Additional entries specific to a trap network annotation |
10 class SkPdfTrapNetworkAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfTrapNetworkAnnotationDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfTrapNetworkAnnotationDictionary& operator=(const SkPdfTrapNetworkAnnotati
onDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from
.fPodofoObj; return *this;} | 526 SkPdfTrapNetworkAnnotationDictionary& operator=(const SkPdfTrapNetworkAnnotati
onDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from
.fPodofoObj; return *this;} |
527 | 527 |
528 /** (Required) The type of annotation that this dictionary describes; must be | 528 /** (Required) The type of annotation that this dictionary describes; must be |
529 * TrapNet for a trap network annotation. | 529 * TrapNet for a trap network annotation. |
530 **/ | 530 **/ |
531 bool has_Subtype() const { | 531 bool has_Subtype() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string Subtype() const { | 535 std::string Subtype() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Optional; PDF 1.4) An alternate description of the annotation's contents in | 536 /** (Optional; PDF 1.4) An alternate description of the annotation's contents in |
543 * human-readable form, useful when extracting the document's contents in | 537 * human-readable form, useful when extracting the document's contents in |
544 * support of accessibility to disabled users or for other purposes (see Sectio
n | 538 * support of accessibility to disabled users or for other purposes (see Sectio
n |
545 * 9.8.2, "Alternate Descriptions"). | 539 * 9.8.2, "Alternate Descriptions"). |
546 **/ | 540 **/ |
547 bool has_Contents() const { | 541 bool has_Contents() const { |
548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
549 } | 543 } |
550 | 544 |
551 std::string Contents() const { | 545 std::string Contents() const; |
552 std::string ret; | |
553 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
555 return ""; | |
556 } | |
557 | |
558 /** (Required if Version and AnnotStates are absent; must be absent if Version a
nd | 546 /** (Required if Version and AnnotStates are absent; must be absent if Version a
nd |
559 * AnnotStates are present; PDF 1.4) The date and time (see Section 3.8.2, | 547 * AnnotStates are present; PDF 1.4) The date and time (see Section 3.8.2, |
560 * "Dates") when the trap network was most recently modified. | 548 * "Dates") when the trap network was most recently modified. |
561 **/ | 549 **/ |
562 bool has_LastModified() const { | 550 bool has_LastModified() const { |
563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastM
odified", "", NULL)); | 551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastM
odified", "", NULL)); |
564 } | 552 } |
565 | 553 |
566 SkPdfDate LastModified() const { | 554 SkPdfDate LastModified() const; |
567 SkPdfDate ret; | |
568 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModifie
d", "", &ret)) return ret; | |
569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
570 return SkPdfDate(); | |
571 } | |
572 | |
573 /** (Required if AnnotStates is present; must be absent if LastModified is prese
nt) | 555 /** (Required if AnnotStates is present; must be absent if LastModified is prese
nt) |
574 * An unordered array of all objects present in the page description at the tim
e | 556 * An unordered array of all objects present in the page description at the tim
e |
575 * the trap networks were generated and that, if changed, could affect the | 557 * the trap networks were generated and that, if changed, could affect the |
576 * appearance of the page. If present, the array must include the following | 558 * appearance of the page. If present, the array must include the following |
577 * objects: | 559 * objects: |
578 * * All content streams identified in the page object's Contents entry (see | 560 * * All content streams identified in the page object's Contents entry (see |
579 * "Page Objects" on page 87) | 561 * "Page Objects" on page 87) |
580 * * All resource objects (other than procedure sets) in the page's resource d
ic- | 562 * * All resource objects (other than procedure sets) in the page's resource d
ic- |
581 * tionary (see Section 3.7.2, "Resource Dictionaries") | 563 * tionary (see Section 3.7.2, "Resource Dictionaries") |
582 * * All resource objects (other than procedure sets) in the resource diction- | 564 * * All resource objects (other than procedure sets) in the resource diction- |
583 * aries of any form XObjects on the page (see Section 4.9, "Form XObjects") | 565 * aries of any form XObjects on the page (see Section 4.9, "Form XObjects") |
584 * * All OPI dictionaries associated with XObjects on the page (see Section | 566 * * All OPI dictionaries associated with XObjects on the page (see Section |
585 * 9.10.6, "Open Prepress Interface (OPI)") | 567 * 9.10.6, "Open Prepress Interface (OPI)") |
586 **/ | 568 **/ |
587 bool has_Version() const { | 569 bool has_Version() const { |
588 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Versi
on", "", NULL)); | 570 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Versi
on", "", NULL)); |
589 } | 571 } |
590 | 572 |
591 SkPdfArray* Version() const { | 573 SkPdfArray* Version() const; |
592 SkPdfArray* ret; | |
593 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version",
"", &ret)) return ret; | |
594 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
595 return NULL; | |
596 } | |
597 | |
598 /** (Required if Version is present; must be absent if LastModified is present)
An | 574 /** (Required if Version is present; must be absent if LastModified is present)
An |
599 * array of name objects representing the appearance states (value of the AS | 575 * array of name objects representing the appearance states (value of the AS |
600 * entry) for annotations associated with the page. The appearance states must | 576 * entry) for annotations associated with the page. The appearance states must |
601 * be listed in the same order as the annotations in the page's Annots array (s
ee | 577 * be listed in the same order as the annotations in the page's Annots array (s
ee |
602 * "Page Objects" on page 87). For an annotation with no AS entry, the corre- | 578 * "Page Objects" on page 87). For an annotation with no AS entry, the corre- |
603 * sponding array element should be null. No appearance state should be | 579 * sponding array element should be null. No appearance state should be |
604 * included for the trap network annotation itself. | 580 * included for the trap network annotation itself. |
605 **/ | 581 **/ |
606 bool has_AnnotStates() const { | 582 bool has_AnnotStates() const { |
607 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot
States", "", NULL)); | 583 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot
States", "", NULL)); |
608 } | 584 } |
609 | 585 |
610 SkPdfArray* AnnotStates() const { | 586 SkPdfArray* AnnotStates() const; |
611 SkPdfArray* ret; | |
612 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AnnotState
s", "", &ret)) return ret; | |
613 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
614 return NULL; | |
615 } | |
616 | |
617 /** (Optional) An array of font dictionaries representing fonts that were "fauxe
d" | 587 /** (Optional) An array of font dictionaries representing fonts that were "fauxe
d" |
618 * (replaced by substitute fonts) during the generation of trap networks for th
e | 588 * (replaced by substitute fonts) during the generation of trap networks for th
e |
619 * page. | 589 * page. |
620 **/ | 590 **/ |
621 bool has_FontFauxing() const { | 591 bool has_FontFauxing() const { |
622 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
auxing", "", NULL)); | 592 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF
auxing", "", NULL)); |
623 } | 593 } |
624 | 594 |
625 SkPdfArray* FontFauxing() const { | 595 SkPdfArray* FontFauxing() const; |
626 SkPdfArray* ret; | |
627 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFauxin
g", "", &ret)) return ret; | |
628 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
629 return NULL; | |
630 } | |
631 | |
632 }; | 596 }; |
633 | 597 |
634 #endif // __DEFINED__SkPdfTrapNetworkAnnotationDictionary | 598 #endif // __DEFINED__SkPdfTrapNetworkAnnotationDictionary |
OLD | NEW |