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

Side by Side Diff: experimental/PdfViewer/SkPdfMarkupAnnotationsDictionary_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__SkPdfMarkupAnnotationsDictionary 1 #ifndef __DEFINED__SkPdfMarkupAnnotationsDictionary
2 #define __DEFINED__SkPdfMarkupAnnotationsDictionary 2 #define __DEFINED__SkPdfMarkupAnnotationsDictionary
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 markup annotations
8 class SkPdfMarkupAnnotationsDictionary : public SkPdfDictionary { 9 class SkPdfMarkupAnnotationsDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kMarkupAnnotationsDictionary_ SkPdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kMarkupAnnotationsDictionary_ SkPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMarkupA nnotationsDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMarkupA nnotationsDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() {ret urn this;} 14 virtual SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() {ret urn this;}
14 virtual const SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary( ) const {return this;} 15 virtual const SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary( ) 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 SkPdfMarkupAnnotationsDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfMarkupAnnotationsDictionary(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 SkPdfMarkupAnnotationsDictionary& operator=(const SkPdfMarkupAnnotationsDictio nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo Obj; return *this;} 523 SkPdfMarkupAnnotationsDictionary& operator=(const SkPdfMarkupAnnotationsDictio nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo Obj; return *this;}
523 524
525 /** (Required) The type of annotation that this dictionary describes; must be
526 * Highlight, Underline, Squiggly, or StrikeOut for a highlight, underline,
527 * squiggly-underline, or strikeout annotation, respectively.
528 **/
529 bool has_Subtype() const {
530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
531 }
532
524 std::string Subtype() const { 533 std::string Subtype() const {
525 std::string ret; 534 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret; 535 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &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 ""; 537 return "";
529 } 538 }
530 539
540 /** (Required) The text to be displayed in the pop-up window when the annota-
541 * tion is opened. Carriage returns may be used to separate the text into para-
542 * graphs.
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) An array of 8 x n numbers specifying the coordinates of n quadri-
556 * laterals in default user space. Each quadrilateral encompasses a word or
557 * group of contiguous words in the text underlying the annotation. The coor-
558 * dinates for each quadrilateral are given in the order
559 * x1 y1 x2 y2 x3 y3 x4 y4
560 * specifying the quadrilateral's four vertices in counterclockwise order (see
561 * Figure 8.5). The text is oriented with respect to the edge connecting points
562 * (x1 , y1) and (x2 , y2). (See implementation note 67 in Appendix H.)
563 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the
564 * QuadPoints entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance
565 * Streams."
566 * (x3 , y3 )
567 * ter
568 * (x2 , y2 )
569 * pi
570 * (x4 , y4 )
571 * Ju
572 * (x1 , y1 )
573 * FIGURE 8.5 QuadPoints specification
574 **/
575 bool has_QuadPoints() const {
576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadP oints", "", NULL));
577 }
578
538 SkPdfArray QuadPoints() const { 579 SkPdfArray QuadPoints() const {
539 SkPdfArray ret; 580 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadPoints ", "", &ret)) return ret; 581 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadPoints ", "", &ret)) return ret;
541 // 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
542 return SkPdfArray(); 583 return SkPdfArray();
543 } 584 }
544 585
545 }; 586 };
546 587
547 #endif // __DEFINED__SkPdfMarkupAnnotationsDictionary 588 #endif // __DEFINED__SkPdfMarkupAnnotationsDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698