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

Side by Side Diff: experimental/PdfViewer/SkPdfIconFitDictionary_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__SkPdfIconFitDictionary 1 #ifndef __DEFINED__SkPdfIconFitDictionary
2 #define __DEFINED__SkPdfIconFitDictionary 2 #define __DEFINED__SkPdfIconFitDictionary
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 // Entries in an icon fit dictionary
8 class SkPdfIconFitDictionary : public SkPdfDictionary { 9 class SkPdfIconFitDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kIconFitDictionary_SkPdfObjec tType;} 11 virtual SkPdfObjectType getType() const { return kIconFitDictionary_SkPdfObjec tType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kIconFit Dictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kIconFit Dictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfIconFitDictionary* asIconFitDictionary() {return this;} 14 virtual SkPdfIconFitDictionary* asIconFitDictionary() {return this;}
14 virtual const SkPdfIconFitDictionary* asIconFitDictionary() const {return this ;} 15 virtual const SkPdfIconFitDictionary* asIconFitDictionary() 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 SkPdfIconFitDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject * podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfIconFitDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject * podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfIconFitDictionary& operator=(const SkPdfIconFitDictionary& from) {this->f PodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfIconFitDictionary& operator=(const SkPdfIconFitDictionary& from) {this->f PodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** (Required) The circumstances under which the icon should be scaled inside th e annota-
526 * tion rectangle:
527 * A Always scale.
528 * B Scale only when the icon is bigger than the annotation rectangle.
529 * S Scale only when the icon is smaller than the annotation rectangle.
530 * N Never scale.
531 * Default value: A.
532 **/
533 bool has_SW() const {
534 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", NULL));
535 }
536
524 std::string SW() const { 537 std::string SW() const {
525 std::string ret; 538 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", &r et)) return ret; 539 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", &r et)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 540 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return ""; 541 return "";
529 } 542 }
530 543
544 /** (Required) The type of scaling to use:
545 * A Anamorphic scaling: scale the icon to fill the annotation rectangle exactly, with-
546 * out regard to its original aspect ratio (ratio of width to height).
547 * P Proportional scaling: scale the icon to fit the width or height of the annotation
548 * rectangle while maintaining the icon's original aspect ratio. If th e required hori-
549 * zontal and vertical scaling factors are different, use the smaller of the two, cen-
550 * tering the icon within the annotation rectangle in the other dimens ion.
551 * Default value: P.
552 **/
553 bool has_S() const {
554 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
555 }
556
531 std::string S() const { 557 std::string S() const {
532 std::string ret; 558 std::string ret;
533 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 559 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 560 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 561 return "";
536 } 562 }
537 563
564 /** (Required) An array of two numbers between 0.0 and 1.0 indicating the fracti on of left-
565 * over space to allocate at the left and bottom of the icon. A value of [0.0 0 .0] positions the
566 * icon at the bottom-left corner of the annotation rectangle; a value of [0.5 0.5] centers it
567 * within the rectangle. This entry is used only if the icon is scaled proporti onally. Default
568 * value: [0.5 0.5].
569 **/
570 bool has_A() const {
571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", " ", NULL));
572 }
573
538 SkPdfArray A() const { 574 SkPdfArray A() const {
539 SkPdfArray ret; 575 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &r et)) return ret; 576 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &r et)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 577 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return SkPdfArray(); 578 return SkPdfArray();
543 } 579 }
544 580
545 }; 581 };
546 582
547 #endif // __DEFINED__SkPdfIconFitDictionary 583 #endif // __DEFINED__SkPdfIconFitDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698