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

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

Issue 17856004: refactoring for pdf viewer lib (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__SkPdfIconFitDictionary 1 #ifndef __DEFINED__SkPdfIconFitDictionary
2 #define __DEFINED__SkPdfIconFitDictionary 2 #define __DEFINED__SkPdfIconFitDictionary
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 // Entries in an icon fit dictionary 9 // Entries in an icon fit dictionary
10 class SkPdfIconFitDictionary : public SkPdfDictionary { 10 class SkPdfIconFitDictionary : public SkPdfDictionary {
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 * A Always scale. 530 * A Always scale.
531 * B Scale only when the icon is bigger than the annotation rectangle. 531 * B Scale only when the icon is bigger than the annotation rectangle.
532 * S Scale only when the icon is smaller than the annotation rectangle. 532 * S Scale only when the icon is smaller than the annotation rectangle.
533 * N Never scale. 533 * N Never scale.
534 * Default value: A. 534 * Default value: A.
535 **/ 535 **/
536 bool has_SW() const { 536 bool has_SW() const {
537 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", NULL)); 537 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", NULL));
538 } 538 }
539 539
540 std::string SW() const { 540 std::string SW() const;
541 std::string ret;
542 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", &r et)) return ret;
543 // TODO(edisonn): warn about missing required field, assert for known good p dfs
544 return "";
545 }
546
547 /** (Required) The type of scaling to use: 541 /** (Required) The type of scaling to use:
548 * A Anamorphic scaling: scale the icon to fill the annotation rectangle exactly, with- 542 * A Anamorphic scaling: scale the icon to fill the annotation rectangle exactly, with-
549 * out regard to its original aspect ratio (ratio of width to height). 543 * out regard to its original aspect ratio (ratio of width to height).
550 * P Proportional scaling: scale the icon to fit the width or height of the annotation 544 * P Proportional scaling: scale the icon to fit the width or height of the annotation
551 * rectangle while maintaining the icon's original aspect ratio. If th e required hori- 545 * rectangle while maintaining the icon's original aspect ratio. If th e required hori-
552 * zontal and vertical scaling factors are different, use the smaller of the two, cen- 546 * zontal and vertical scaling factors are different, use the smaller of the two, cen-
553 * tering the icon within the annotation rectangle in the other dimens ion. 547 * tering the icon within the annotation rectangle in the other dimens ion.
554 * Default value: P. 548 * Default value: P.
555 **/ 549 **/
556 bool has_S() const { 550 bool has_S() const {
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL)); 551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
558 } 552 }
559 553
560 std::string S() const { 554 std::string S() const;
561 std::string ret;
562 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
563 // TODO(edisonn): warn about missing required field, assert for known good p dfs
564 return "";
565 }
566
567 /** (Required) An array of two numbers between 0.0 and 1.0 indicating the fracti on of left- 555 /** (Required) An array of two numbers between 0.0 and 1.0 indicating the fracti on of left-
568 * over space to allocate at the left and bottom of the icon. A value of [0.0 0 .0] positions the 556 * over space to allocate at the left and bottom of the icon. A value of [0.0 0 .0] positions the
569 * icon at the bottom-left corner of the annotation rectangle; a value of [0.5 0.5] centers it 557 * icon at the bottom-left corner of the annotation rectangle; a value of [0.5 0.5] centers it
570 * within the rectangle. This entry is used only if the icon is scaled proporti onally. Default 558 * within the rectangle. This entry is used only if the icon is scaled proporti onally. Default
571 * value: [0.5 0.5]. 559 * value: [0.5 0.5].
572 **/ 560 **/
573 bool has_A() const { 561 bool has_A() const {
574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", " ", NULL)); 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", " ", NULL));
575 } 563 }
576 564
577 SkPdfArray* A() const { 565 SkPdfArray* A() const;
578 SkPdfArray* ret;
579 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &r et)) return ret;
580 // TODO(edisonn): warn about missing required field, assert for known good p dfs
581 return NULL;
582 }
583
584 }; 566 };
585 567
586 #endif // __DEFINED__SkPdfIconFitDictionary 568 #endif // __DEFINED__SkPdfIconFitDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698