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

Side by Side Diff: experimental/PdfViewer/SkPdfArtifactsDictionary_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__SkPdfArtifactsDictionary 1 #ifndef __DEFINED__SkPdfArtifactsDictionary
2 #define __DEFINED__SkPdfArtifactsDictionary 2 #define __DEFINED__SkPdfArtifactsDictionary
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 // Property list entries for artifacts
8 class SkPdfArtifactsDictionary : public SkPdfDictionary { 9 class SkPdfArtifactsDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kArtifactsDictionary_SkPdfObj ectType;} 11 virtual SkPdfObjectType getType() const { return kArtifactsDictionary_SkPdfObj ectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kArtifac tsDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kArtifac tsDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfArtifactsDictionary* asArtifactsDictionary() {return this;} 14 virtual SkPdfArtifactsDictionary* asArtifactsDictionary() {return this;}
14 virtual const SkPdfArtifactsDictionary* asArtifactsDictionary() const {return this;} 15 virtual const SkPdfArtifactsDictionary* asArtifactsDictionary() 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 SkPdfArtifactsDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfArtifactsDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfArtifactsDictionary& operator=(const SkPdfArtifactsDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;} 523 SkPdfArtifactsDictionary& operator=(const SkPdfArtifactsDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;}
523 524
525 /** (Optional) The type of artifact that this property list describes; if presen t, must
526 * be one of the names Pagination, Layout, or Page.
527 **/
528 bool has_Type() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL));
530 }
531
524 std::string Type() const { 532 std::string Type() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 535 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return ""; 536 return "";
529 } 537 }
530 538
539 /** (Optional) An array of four numbers in default user space units giving the c oor-
540 * dinates of the left, bottom, right, and top edges, respectively, of the arti fact's
541 * bounding box (the rectangle that completely encloses its visible extent).
542 **/
543 bool has_BBox() const {
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox" , "", NULL));
545 }
546
531 SkRect BBox() const { 547 SkRect BBox() const {
532 SkRect ret; 548 SkRect ret;
533 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "" , &ret)) return ret; 549 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "" , &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 SkRect(); 551 return SkRect();
536 } 552 }
537 553
554 /** (Optional; pagination artifacts only) An array of name objects containing on e to
555 * four of the names Top, Bottom, Left, and Right, specifying the edges of the page, if
556 * any, to which the artifact is logically attached. Page edges are defined by the
557 * page's crop box (see Section 9.10.1, "Page Boundaries"). The ordering of nam es
558 * within the array is immaterial. Including both Left and Right or both Top an d
559 * Bottom indicates a full-width or full-height artifact, respectively.
560 **/
561 bool has_Attached() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attac hed", "", NULL));
563 }
564
538 SkPdfArray Attached() const { 565 SkPdfArray Attached() const {
539 SkPdfArray ret; 566 SkPdfArray ret;
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", &ret)) return ret; 567 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 568 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return SkPdfArray(); 569 return SkPdfArray();
543 } 570 }
544 571
545 }; 572 };
546 573
547 #endif // __DEFINED__SkPdfArtifactsDictionary 574 #endif // __DEFINED__SkPdfArtifactsDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698