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

Side by Side Diff: experimental/PdfViewer/SkPdfAlternateImageDictionary_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__SkPdfAlternateImageDictionary 1 #ifndef __DEFINED__SkPdfAlternateImageDictionary
2 #define __DEFINED__SkPdfAlternateImageDictionary 2 #define __DEFINED__SkPdfAlternateImageDictionary
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 alternate image dictionary
8 class SkPdfAlternateImageDictionary : public SkPdfDictionary { 9 class SkPdfAlternateImageDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kAlternateImageDictionary_SkP dfObjectType;} 11 virtual SkPdfObjectType getType() const { return kAlternateImageDictionary_SkP dfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kAlterna teImageDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kAlterna teImageDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfAlternateImageDictionary* asAlternateImageDictionary() {return th is;} 14 virtual SkPdfAlternateImageDictionary* asAlternateImageDictionary() {return th is;}
14 virtual const SkPdfAlternateImageDictionary* asAlternateImageDictionary() cons t {return this;} 15 virtual const SkPdfAlternateImageDictionary* asAlternateImageDictionary() 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 SkPdfAlternateImageDictionary(const PdfMemDocument* podofoDoc = NULL, const Pd fObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfAlternateImageDictionary(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 SkPdfAlternateImageDictionary& operator=(const SkPdfAlternateImageDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r eturn *this;} 523 SkPdfAlternateImageDictionary& operator=(const SkPdfAlternateImageDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r eturn *this;}
523 524
525 /** (Required) The image XObject for the alternate image.
526 **/
527 bool has_Image() const {
528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image ", "", NULL));
529 }
530
524 SkPdfStream Image() const { 531 SkPdfStream Image() const {
525 SkPdfStream ret; 532 SkPdfStream ret;
526 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", " ", &ret)) return ret; 533 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", " ", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 534 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return SkPdfStream(); 535 return SkPdfStream();
529 } 536 }
530 537
538 /** (Optional) A flag indicating whether this alternate image is the default ver -
539 * sion to be used for printing. At most one alternate for a given base image m ay
540 * be so designated. If no alternate has this entry set to true, the base image itself
541 * is used for printing.
542 **/
543 bool has_DefaultForPrinting() const {
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Defau ltForPrinting", "", NULL));
545 }
546
531 bool DefaultForPrinting() const { 547 bool DefaultForPrinting() const {
532 bool ret; 548 bool ret;
533 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForP rinting", "", &ret)) return ret; 549 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForP rinting", "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 550 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return false; 551 return false;
536 } 552 }
537 553
538 }; 554 };
539 555
540 #endif // __DEFINED__SkPdfAlternateImageDictionary 556 #endif // __DEFINED__SkPdfAlternateImageDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698