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

Side by Side Diff: experimental/PdfViewer/SkPdfLineAnnotationDictionary_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__SkPdfLineAnnotationDictionary 1 #ifndef __DEFINED__SkPdfLineAnnotationDictionary
2 #define __DEFINED__SkPdfLineAnnotationDictionary 2 #define __DEFINED__SkPdfLineAnnotationDictionary
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 line annotation
8 class SkPdfLineAnnotationDictionary : public SkPdfDictionary { 9 class SkPdfLineAnnotationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kLineAnnotationDictionary_SkP dfObjectType;} 11 virtual SkPdfObjectType getType() const { return kLineAnnotationDictionary_SkP dfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kLineAnn otationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kLineAnn otationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() {return th is;} 14 virtual SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() {return th is;}
14 virtual const SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() cons t {return this;} 15 virtual const SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() cons t {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 SkPdfLineAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const Pd fObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfLineAnnotationDictionary(const PdfMemDocument* podofoDoc = NULL, const Pd fObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfLineAnnotationDictionary& operator=(const SkPdfLineAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r eturn *this;} 523 SkPdfLineAnnotationDictionary& operator=(const SkPdfLineAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r eturn *this;}
523 524
525 /** (Required) The type of annotation that this dictionary describes; must be Li ne
526 * for a line 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 four numbers, [x1 y1 x2 y2 ], specifying the starting and
554 * ending coordinates of the line in default user space.
555 **/
556 bool has_L() const {
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", " ", NULL));
558 }
559
538 SkPdfArray L() const { 560 SkPdfArray L() const {
539 SkPdfArray ret; 561 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &r et)) return ret; 562 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &r et)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 563 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return SkPdfArray(); 564 return SkPdfArray();
543 } 565 }
544 566
567 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the
568 * width and dash pattern to be used in drawing the line.
569 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the L
570 * and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearance St reams."
571 **/
572 bool has_BS() const {
573 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
574 }
575
545 SkPdfDictionary* BS() const { 576 SkPdfDictionary* BS() const {
546 SkPdfDictionary* ret; 577 SkPdfDictionary* ret;
547 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret; 578 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 579 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return NULL; 580 return NULL;
550 } 581 }
551 582
583 /** (Optional; PDF 1.4) An array of two names specifying the line ending styles to be
584 * used in drawing the line. The first and second elements of the array specify the
585 * line ending styles for the endpoints defined, respectively, by the first and second
586 * pairs of coordinates, (x1 , y1 ) and (x2 , y2 ), in the L array. Table 8.19 shows the
587 * possible values. Default value: [/None /None].
588 **/
589 bool has_LE() const {
590 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE", "", NULL));
591 }
592
552 SkPdfArray LE() const { 593 SkPdfArray LE() const {
553 SkPdfArray ret; 594 SkPdfArray ret;
554 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE", "", & ret)) return ret; 595 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE", "", & ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 596 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return SkPdfArray(); 597 return SkPdfArray();
557 } 598 }
558 599
600 /** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specif ying
601 * the components, in the DeviceRGB color space, of the interior color with whi ch to
602 * fill the annotation's line endings (see Table 8.19). If this entry is absent , the inte-
603 * riors of the line endings are left transparent.
604 **/
605 bool has_IC() const {
606 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", NULL));
607 }
608
559 SkPdfArray IC() const { 609 SkPdfArray IC() const {
560 SkPdfArray ret; 610 SkPdfArray ret;
561 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", & ret)) return ret; 611 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", & ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 612 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return SkPdfArray(); 613 return SkPdfArray();
564 } 614 }
565 615
566 }; 616 };
567 617
568 #endif // __DEFINED__SkPdfLineAnnotationDictionary 618 #endif // __DEFINED__SkPdfLineAnnotationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698