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