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

Side by Side Diff: experimental/PdfViewer/SkPdfType2FunctionDictionary_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__SkPdfType2FunctionDictionary 1 #ifndef __DEFINED__SkPdfType2FunctionDictionary
2 #define __DEFINED__SkPdfType2FunctionDictionary 2 #define __DEFINED__SkPdfType2FunctionDictionary
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 // Additional entries specific to a type 2 function dictionary
8 class SkPdfType2FunctionDictionary : public SkPdfDictionary { 9 class SkPdfType2FunctionDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kType2FunctionDictionary_SkPd fObjectType;} 11 virtual SkPdfObjectType getType() const { return kType2FunctionDictionary_SkPd fObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType2Fu nctionDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType2Fu nctionDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfType2FunctionDictionary* asType2FunctionDictionary() {return this ;} 14 virtual SkPdfType2FunctionDictionary* asType2FunctionDictionary() {return this ;}
14 virtual const SkPdfType2FunctionDictionary* asType2FunctionDictionary() const {return this;} 15 virtual const SkPdfType2FunctionDictionary* asType2FunctionDictionary() 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 SkPdfType2FunctionDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfType2FunctionDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfType2FunctionDictionary& operator=(const SkPdfType2FunctionDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;} 523 SkPdfType2FunctionDictionary& operator=(const SkPdfType2FunctionDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;}
523 524
525 /** (Optional) An array of n numbers defining the function result when x = 0.0 ( hence the "0"
526 * in the name). Default value: [0.0].
527 **/
528 bool has_C0() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0", "", NULL));
530 }
531
524 SkPdfArray C0() const { 532 SkPdfArray C0() const {
525 SkPdfArray ret; 533 SkPdfArray ret;
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0", "", & ret)) return ret; 534 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0", "", & 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 SkPdfArray(); 536 return SkPdfArray();
529 } 537 }
530 538
539 /** (Optional) An array of n numbers defining the function result when x = 1.0 ( hence the "1"
540 * in the name). Default value: [1.0].
541 **/
542 bool has_C1() const {
543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1", "", NULL));
544 }
545
531 SkPdfArray C1() const { 546 SkPdfArray C1() const {
532 SkPdfArray ret; 547 SkPdfArray ret;
533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1", "", & ret)) return ret; 548 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1", "", & ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 549 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return SkPdfArray(); 550 return SkPdfArray();
536 } 551 }
537 552
553 /** (Required) The interpolation exponent. Each input value x will return n valu es, given by
554 * yj = C0j + xN x (C1j - C0j ), for 0 <= j < n.
555 **/
556 bool has_N() const {
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", " ", NULL));
558 }
559
538 double N() const { 560 double N() const {
539 double ret; 561 double ret;
540 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", & ret)) return ret; 562 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", & ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 563 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return 0; 564 return 0;
543 } 565 }
544 566
545 }; 567 };
546 568
547 #endif // __DEFINED__SkPdfType2FunctionDictionary 569 #endif // __DEFINED__SkPdfType2FunctionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698