OLD | NEW |
1 #ifndef __DEFINED__SkPdfType2FunctionDictionary | 1 #ifndef __DEFINED__SkPdfType2FunctionDictionary |
2 #define __DEFINED__SkPdfType2FunctionDictionary | 2 #define __DEFINED__SkPdfType2FunctionDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
8 | 8 |
9 // Additional entries specific to a type 2 function dictionary | 9 // Additional entries specific to a type 2 function dictionary |
10 class SkPdfType2FunctionDictionary : public SkPdfDictionary { | 10 class SkPdfType2FunctionDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfType2FunctionDictionary& operator=(const SkPdfType2FunctionDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} | 526 SkPdfType2FunctionDictionary& operator=(const SkPdfType2FunctionDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} |
527 | 527 |
528 /** (Optional) An array of n numbers defining the function result when x = 0.0 (
hence the "0" | 528 /** (Optional) An array of n numbers defining the function result when x = 0.0 (
hence the "0" |
529 * in the name). Default value: [0.0]. | 529 * in the name). Default value: [0.0]. |
530 **/ | 530 **/ |
531 bool has_C0() const { | 531 bool has_C0() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0",
"", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0",
"", NULL)); |
533 } | 533 } |
534 | 534 |
535 SkPdfArray* C0() const { | 535 SkPdfArray* C0() const; |
536 SkPdfArray* ret; | |
537 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0", "", &
ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return NULL; | |
540 } | |
541 | |
542 /** (Optional) An array of n numbers defining the function result when x = 1.0 (
hence the "1" | 536 /** (Optional) An array of n numbers defining the function result when x = 1.0 (
hence the "1" |
543 * in the name). Default value: [1.0]. | 537 * in the name). Default value: [1.0]. |
544 **/ | 538 **/ |
545 bool has_C1() const { | 539 bool has_C1() const { |
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1",
"", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1",
"", NULL)); |
547 } | 541 } |
548 | 542 |
549 SkPdfArray* C1() const { | 543 SkPdfArray* C1() const; |
550 SkPdfArray* ret; | |
551 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1", "", &
ret)) return ret; | |
552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
553 return NULL; | |
554 } | |
555 | |
556 /** (Required) The interpolation exponent. Each input value x will return n valu
es, given by | 544 /** (Required) The interpolation exponent. Each input value x will return n valu
es, given by |
557 * yj = C0j + xN x (C1j - C0j ), for 0 <= j < n. | 545 * yj = C0j + xN x (C1j - C0j ), for 0 <= j < n. |
558 **/ | 546 **/ |
559 bool has_N() const { | 547 bool has_N() const { |
560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", NULL)); | 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", NULL)); |
561 } | 549 } |
562 | 550 |
563 double N() const { | 551 double N() const; |
564 double ret; | |
565 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &
ret)) return ret; | |
566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
567 return 0; | |
568 } | |
569 | |
570 }; | 552 }; |
571 | 553 |
572 #endif // __DEFINED__SkPdfType2FunctionDictionary | 554 #endif // __DEFINED__SkPdfType2FunctionDictionary |
OLD | NEW |