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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfInkAnnotationDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 "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 an ink annotation 9 // Additional entries specific to an ink annotation
10 class SkPdfInkAnnotationDictionary : public SkPdfDictionary { 10 class SkPdfInkAnnotationDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfInkAnnotationDictionary& operator=(const SkPdfInkAnnotationDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;} 526 SkPdfInkAnnotationDictionary& operator=(const SkPdfInkAnnotationDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;}
527 527
528 /** (Required) The type of annotation that this dictionary describes; must be In k for 528 /** (Required) The type of annotation that this dictionary describes; must be In k for
529 * an ink annotation. 529 * an ink annotation.
530 **/ 530 **/
531 bool has_Subtype() const { 531 bool has_Subtype() const {
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL)); 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
533 } 533 }
534 534
535 std::string Subtype() const { 535 std::string Subtype() const;
536 std::string ret;
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret;
538 // TODO(edisonn): warn about missing required field, assert for known good p dfs
539 return "";
540 }
541
542 /** (Required) The text to be displayed in the pop-up window when the annotation 536 /** (Required) The text to be displayed in the pop-up window when the annotation
543 * is opened. Carriage returns may be used to separate the text into paragraphs . 537 * is opened. Carriage returns may be used to separate the text into paragraphs .
544 **/ 538 **/
545 bool has_Contents() const { 539 bool has_Contents() const {
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL)); 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
547 } 541 }
548 542
549 std::string Contents() const { 543 std::string Contents() const;
550 std::string ret;
551 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret;
552 // TODO(edisonn): warn about missing required field, assert for known good p dfs
553 return "";
554 }
555
556 /** (Required) An array of n arrays, each representing a stroked path. Each arra y is a 544 /** (Required) An array of n arrays, each representing a stroked path. Each arra y is a
557 * series of alternating horizontal and vertical coordinates in default user sp ace, 545 * series of alternating horizontal and vertical coordinates in default user sp ace,
558 * specifying points along the path. When drawn, the points are connected by 546 * specifying points along the path. When drawn, the points are connected by
559 * straight lines or curves in an implementation-dependent way. (See implementa - 547 * straight lines or curves in an implementation-dependent way. (See implementa -
560 * tion note 68 in Appendix H.) 548 * tion note 68 in Appendix H.)
561 **/ 549 **/
562 bool has_InkList() const { 550 bool has_InkList() const {
563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkLi st", "", NULL)); 551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkLi st", "", NULL));
564 } 552 }
565 553
566 SkPdfArray* InkList() const { 554 SkPdfArray* InkList() const;
567 SkPdfArray* ret;
568 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkList", "", &ret)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return NULL;
571 }
572
573 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the 555 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the
574 * line width and dash pattern to be used in drawing the paths. 556 * line width and dash pattern to be used in drawing the paths.
575 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the 557 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the
576 * InkList and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appea rance 558 * InkList and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appea rance
577 * Streams." 559 * Streams."
578 **/ 560 **/
579 bool has_BS() const { 561 bool has_BS() const {
580 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL)); 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
581 } 563 }
582 564
583 SkPdfDictionary* BS() const { 565 SkPdfDictionary* BS() const;
584 SkPdfDictionary* ret;
585 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
586 // TODO(edisonn): warn about missing required field, assert for known good p dfs
587 return NULL;
588 }
589
590 }; 566 };
591 567
592 #endif // __DEFINED__SkPdfInkAnnotationDictionary 568 #endif // __DEFINED__SkPdfInkAnnotationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698