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

Side by Side Diff: experimental/PdfViewer/SkPdfInkAnnotationDictionary_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__SkPdfInkAnnotationDictionary 1 #ifndef __DEFINED__SkPdfInkAnnotationDictionary
2 #define __DEFINED__SkPdfInkAnnotationDictionary 2 #define __DEFINED__SkPdfInkAnnotationDictionary
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 an ink annotation
8 class SkPdfInkAnnotationDictionary : public SkPdfDictionary { 9 class SkPdfInkAnnotationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kInkAnnotationDictionary_SkPd fObjectType;} 11 virtual SkPdfObjectType getType() const { return kInkAnnotationDictionary_SkPd fObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kInkAnno tationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kInkAnno tationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() {return this ;} 14 virtual SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() {return this ;}
14 virtual const SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() const {return this;} 15 virtual const SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() 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 SkPdfInkAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfInkAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfInkAnnotationDictionary& operator=(const SkPdfInkAnnotationDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;} 523 SkPdfInkAnnotationDictionary& operator=(const SkPdfInkAnnotationDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;}
523 524
525 /** (Required) The type of annotation that this dictionary describes; must be In k for
526 * an ink 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 /** (Required) The text to be displayed in the pop-up window when the annotation
540 * is opened. Carriage returns may be used to separate the text into paragraphs .
541 **/
542 bool has_Contents() const {
543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
544 }
545
531 std::string Contents() const { 546 std::string Contents() const {
532 std::string ret; 547 std::string ret;
533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret; 548 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 549 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 550 return "";
536 } 551 }
537 552
553 /** (Required) An array of n arrays, each representing a stroked path. Each arra y is a
554 * series of alternating horizontal and vertical coordinates in default user sp ace,
555 * specifying points along the path. When drawn, the points are connected by
556 * straight lines or curves in an implementation-dependent way. (See implementa -
557 * tion note 68 in Appendix H.)
558 **/
559 bool has_InkList() const {
560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkLi st", "", NULL));
561 }
562
538 SkPdfArray InkList() const { 563 SkPdfArray InkList() const {
539 SkPdfArray ret; 564 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkList", "", &ret)) return ret; 565 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkList", "", &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 SkPdfArray(); 567 return SkPdfArray();
543 } 568 }
544 569
570 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the
571 * line width and dash pattern to be used in drawing the paths.
572 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the
573 * InkList and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appea rance
574 * Streams."
575 **/
576 bool has_BS() const {
577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
578 }
579
545 SkPdfDictionary* BS() const { 580 SkPdfDictionary* BS() const {
546 SkPdfDictionary* ret; 581 SkPdfDictionary* ret;
547 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret; 582 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 583 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return NULL; 584 return NULL;
550 } 585 }
551 586
552 }; 587 };
553 588
554 #endif // __DEFINED__SkPdfInkAnnotationDictionary 589 #endif // __DEFINED__SkPdfInkAnnotationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698