OLD | NEW |
1 #ifndef __DEFINED__SkPdfMarkupAnnotationsDictionary | 1 #ifndef __DEFINED__SkPdfMarkupAnnotationsDictionary |
2 #define __DEFINED__SkPdfMarkupAnnotationsDictionary | 2 #define __DEFINED__SkPdfMarkupAnnotationsDictionary |
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 markup annotations | 9 // Additional entries specific to markup annotations |
10 class SkPdfMarkupAnnotationsDictionary : public SkPdfDictionary { | 10 class SkPdfMarkupAnnotationsDictionary : public SkPdfDictionary { |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 SkPdfMarkupAnnotationsDictionary& operator=(const SkPdfMarkupAnnotationsDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 526 SkPdfMarkupAnnotationsDictionary& operator=(const SkPdfMarkupAnnotationsDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; 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 * Highlight, Underline, Squiggly, or StrikeOut for a highlight, underline, | 529 * Highlight, Underline, Squiggly, or StrikeOut for a highlight, underline, |
530 * squiggly-underline, or strikeout annotation, respectively. | 530 * squiggly-underline, or strikeout annotation, respectively. |
531 **/ | 531 **/ |
532 bool has_Subtype() const { | 532 bool has_Subtype() const { |
533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
534 } | 534 } |
535 | 535 |
536 std::string Subtype() const { | 536 std::string Subtype() const; |
537 std::string ret; | |
538 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
539 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
540 return ""; | |
541 } | |
542 | |
543 /** (Required) The text to be displayed in the pop-up window when the annota- | 537 /** (Required) The text to be displayed in the pop-up window when the annota- |
544 * tion is opened. Carriage returns may be used to separate the text into para- | 538 * tion is opened. Carriage returns may be used to separate the text into para- |
545 * graphs. | 539 * graphs. |
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) An array of 8 x n numbers specifying the coordinates of n quadri- | 546 /** (Required) An array of 8 x n numbers specifying the coordinates of n quadri- |
559 * laterals in default user space. Each quadrilateral encompasses a word or | 547 * laterals in default user space. Each quadrilateral encompasses a word or |
560 * group of contiguous words in the text underlying the annotation. The coor- | 548 * group of contiguous words in the text underlying the annotation. The coor- |
561 * dinates for each quadrilateral are given in the order | 549 * dinates for each quadrilateral are given in the order |
562 * x1 y1 x2 y2 x3 y3 x4 y4 | 550 * x1 y1 x2 y2 x3 y3 x4 y4 |
563 * specifying the quadrilateral's four vertices in counterclockwise order (see | 551 * specifying the quadrilateral's four vertices in counterclockwise order (see |
564 * Figure 8.5). The text is oriented with respect to the edge connecting points | 552 * Figure 8.5). The text is oriented with respect to the edge connecting points |
565 * (x1 , y1) and (x2 , y2). (See implementation note 67 in Appendix H.) | 553 * (x1 , y1) and (x2 , y2). (See implementation note 67 in Appendix H.) |
566 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the | 554 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the |
567 * QuadPoints entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance | 555 * QuadPoints entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance |
568 * Streams." | 556 * Streams." |
569 * (x3 , y3 ) | 557 * (x3 , y3 ) |
570 * ter | 558 * ter |
571 * (x2 , y2 ) | 559 * (x2 , y2 ) |
572 * pi | 560 * pi |
573 * (x4 , y4 ) | 561 * (x4 , y4 ) |
574 * Ju | 562 * Ju |
575 * (x1 , y1 ) | 563 * (x1 , y1 ) |
576 * FIGURE 8.5 QuadPoints specification | 564 * FIGURE 8.5 QuadPoints specification |
577 **/ | 565 **/ |
578 bool has_QuadPoints() const { | 566 bool has_QuadPoints() const { |
579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadP
oints", "", NULL)); | 567 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadP
oints", "", NULL)); |
580 } | 568 } |
581 | 569 |
582 SkPdfArray* QuadPoints() const { | 570 SkPdfArray* QuadPoints() const; |
583 SkPdfArray* ret; | |
584 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadPoints
", "", &ret)) return ret; | |
585 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
586 return NULL; | |
587 } | |
588 | |
589 }; | 571 }; |
590 | 572 |
591 #endif // __DEFINED__SkPdfMarkupAnnotationsDictionary | 573 #endif // __DEFINED__SkPdfMarkupAnnotationsDictionary |
OLD | NEW |