Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: experimental/PdfViewer/SkPdfTrapNetworkAnnotationDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfTrapNetworkAnnotationDictionary 1 #ifndef __DEFINED__SkPdfTrapNetworkAnnotationDictionary
2 #define __DEFINED__SkPdfTrapNetworkAnnotationDictionary 2 #define __DEFINED__SkPdfTrapNetworkAnnotationDictionary
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 // Additional entries specific to a trap network annotation
8 class SkPdfTrapNetworkAnnotationDictionary : public SkPdfDictionary { 9 class SkPdfTrapNetworkAnnotationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kTrapNetworkAnnotationDiction ary_SkPdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kTrapNetworkAnnotationDiction ary_SkPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrapNet workAnnotationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrapNet workAnnotationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionar y() {return this;} 14 virtual SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionar y() {return this;}
14 virtual const SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDic tionary() const {return this;} 15 virtual const SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDic tionary() 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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfTrapNetworkAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, c onst PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfTrapNetworkAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, c onst 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 SkPdfTrapNetworkAnnotationDictionary& operator=(const SkPdfTrapNetworkAnnotati onDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from .fPodofoObj; return *this;} 523 SkPdfTrapNetworkAnnotationDictionary& operator=(const SkPdfTrapNetworkAnnotati onDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from .fPodofoObj; return *this;}
523 524
525 /** (Required) The type of annotation that this dictionary describes; must be
526 * TrapNet for a trap network annotation.
527 **/
528 bool has_Subtype() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
530 }
531
524 std::string Subtype() const { 532 std::string Subtype() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 535 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return ""; 536 return "";
529 } 537 }
530 538
539 /** (Optional; PDF 1.4) An alternate description of the annotation's contents in
540 * human-readable form, useful when extracting the document's contents in
541 * support of accessibility to disabled users or for other purposes (see Sectio n
542 * 9.8.2, "Alternate Descriptions").
543 **/
544 bool has_Contents() const {
545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
546 }
547
531 std::string Contents() const { 548 std::string Contents() const {
532 std::string ret; 549 std::string ret;
533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret; 550 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &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 ""; 552 return "";
536 } 553 }
537 554
555 /** (Required if Version and AnnotStates are absent; must be absent if Version a nd
556 * AnnotStates are present; PDF 1.4) The date and time (see Section 3.8.2,
557 * "Dates") when the trap network was most recently modified.
558 **/
559 bool has_LastModified() const {
560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastM odified", "", NULL));
561 }
562
538 SkPdfDate LastModified() const { 563 SkPdfDate LastModified() const {
539 SkPdfDate ret; 564 SkPdfDate ret;
540 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModifie d", "", &ret)) return ret; 565 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModifie d", "", &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 SkPdfDate(); 567 return SkPdfDate();
543 } 568 }
544 569
570 /** (Required if AnnotStates is present; must be absent if LastModified is prese nt)
571 * An unordered array of all objects present in the page description at the tim e
572 * the trap networks were generated and that, if changed, could affect the
573 * appearance of the page. If present, the array must include the following
574 * objects:
575 * * All content streams identified in the page object's Contents entry (see
576 * "Page Objects" on page 87)
577 * * All resource objects (other than procedure sets) in the page's resource d ic-
578 * tionary (see Section 3.7.2, "Resource Dictionaries")
579 * * All resource objects (other than procedure sets) in the resource diction-
580 * aries of any form XObjects on the page (see Section 4.9, "Form XObjects")
581 * * All OPI dictionaries associated with XObjects on the page (see Section
582 * 9.10.6, "Open Prepress Interface (OPI)")
583 **/
584 bool has_Version() const {
585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Versi on", "", NULL));
586 }
587
545 SkPdfArray Version() const { 588 SkPdfArray Version() const {
546 SkPdfArray ret; 589 SkPdfArray ret;
547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret; 590 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 591 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return SkPdfArray(); 592 return SkPdfArray();
550 } 593 }
551 594
595 /** (Required if Version is present; must be absent if LastModified is present) An
596 * array of name objects representing the appearance states (value of the AS
597 * entry) for annotations associated with the page. The appearance states must
598 * be listed in the same order as the annotations in the page's Annots array (s ee
599 * "Page Objects" on page 87). For an annotation with no AS entry, the corre-
600 * sponding array element should be null. No appearance state should be
601 * included for the trap network annotation itself.
602 **/
603 bool has_AnnotStates() const {
604 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot States", "", NULL));
605 }
606
552 SkPdfArray AnnotStates() const { 607 SkPdfArray AnnotStates() const {
553 SkPdfArray ret; 608 SkPdfArray ret;
554 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AnnotState s", "", &ret)) return ret; 609 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AnnotState s", "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 610 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return SkPdfArray(); 611 return SkPdfArray();
557 } 612 }
558 613
614 /** (Optional) An array of font dictionaries representing fonts that were "fauxe d"
615 * (replaced by substitute fonts) during the generation of trap networks for th e
616 * page.
617 **/
618 bool has_FontFauxing() const {
619 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontF auxing", "", NULL));
620 }
621
559 SkPdfArray FontFauxing() const { 622 SkPdfArray FontFauxing() const {
560 SkPdfArray ret; 623 SkPdfArray ret;
561 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFauxin g", "", &ret)) return ret; 624 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFauxin g", "", &ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 625 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return SkPdfArray(); 626 return SkPdfArray();
564 } 627 }
565 628
566 }; 629 };
567 630
568 #endif // __DEFINED__SkPdfTrapNetworkAnnotationDictionary 631 #endif // __DEFINED__SkPdfTrapNetworkAnnotationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698