| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfFunctionCommonDictionary | 1 #ifndef __DEFINED__SkPdfFunctionCommonDictionary |
| 2 #define __DEFINED__SkPdfFunctionCommonDictionary | 2 #define __DEFINED__SkPdfFunctionCommonDictionary |
| 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 common to all function dictionaries |
| 8 class SkPdfFunctionCommonDictionary : public SkPdfDictionary { | 9 class SkPdfFunctionCommonDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kFunctionCommonDictionary_SkP
dfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kFunctionCommonDictionary_SkP
dfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFunctio
nCommonDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFunctio
nCommonDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return th
is;} | 14 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return th
is;} |
| 14 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() cons
t {return this;} | 15 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() 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 Loading... |
| 514 | 515 |
| 515 public: | 516 public: |
| 516 private: | 517 private: |
| 517 public: | 518 public: |
| 518 SkPdfFunctionCommonDictionary(const PdfMemDocument* podofoDoc = NULL, const Pd
fObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfFunctionCommonDictionary(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 SkPdfFunctionCommonDictionary& operator=(const SkPdfFunctionCommonDictionary&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} | 523 SkPdfFunctionCommonDictionary& operator=(const SkPdfFunctionCommonDictionary&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} |
| 523 | 524 |
| 525 /** (Required) The function type: |
| 526 * 0 Sampled function |
| 527 * 2 Exponential interpolation function |
| 528 * 3 Stitching function |
| 529 * 4 PostScript calculator function |
| 530 **/ |
| 531 bool has_FunctionType() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Funct
ionType", "", NULL)); |
| 533 } |
| 534 |
| 524 long FunctionType() const { | 535 long FunctionType() const { |
| 525 long ret; | 536 long ret; |
| 526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FunctionTyp
e", "", &ret)) return ret; | 537 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FunctionTyp
e", "", &ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return 0; | 539 return 0; |
| 529 } | 540 } |
| 530 | 541 |
| 542 /** (Required) An array of 2 x m numbers, where m is the number of input |
| 543 * values. For each i from 0 to m - 1, Domain2i must be less than or equal to |
| 544 * Domain2i+1 , and the ith input value, xi , must lie in the interval |
| 545 * Domain2i <= xi <= Domain2i+1 . Input values outside the declared domain are |
| 546 * clipped to the nearest boundary value. |
| 547 **/ |
| 548 bool has_Domain() const { |
| 549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domai
n", "", NULL)); |
| 550 } |
| 551 |
| 531 SkPdfArray Domain() const { | 552 SkPdfArray Domain() const { |
| 532 SkPdfArray ret; | 553 SkPdfArray ret; |
| 533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "
", &ret)) return ret; | 554 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "
", &ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return SkPdfArray(); | 556 return SkPdfArray(); |
| 536 } | 557 } |
| 537 | 558 |
| 559 /** (Required for type 0 and type 4 functions, optional otherwise; see below) An |
| 560 * array of 2 x n numbers, where n is the number of output values. For each j |
| 561 * from 0 to n - 1, Range2j must be less than or equal to Range2j+1 , and the j
th |
| 562 * output value, yj , must lie in the interval Range2j <= yj <= Range2j+1 . Out
put |
| 563 * values outside the declared range are clipped to the nearest boundary value. |
| 564 * If this entry is absent, no clipping is done. |
| 565 **/ |
| 566 bool has_Range() const { |
| 567 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range
", "", NULL)); |
| 568 } |
| 569 |
| 538 SkPdfArray Range() const { | 570 SkPdfArray Range() const { |
| 539 SkPdfArray ret; | 571 SkPdfArray ret; |
| 540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", ""
, &ret)) return ret; | 572 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", ""
, &ret)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 573 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return SkPdfArray(); | 574 return SkPdfArray(); |
| 543 } | 575 } |
| 544 | 576 |
| 545 }; | 577 }; |
| 546 | 578 |
| 547 #endif // __DEFINED__SkPdfFunctionCommonDictionary | 579 #endif // __DEFINED__SkPdfFunctionCommonDictionary |
| OLD | NEW |