OLD | NEW |
1 #ifndef __DEFINED__SkPdfType0FunctionDictionary | 1 #ifndef __DEFINED__SkPdfType0FunctionDictionary |
2 #define __DEFINED__SkPdfType0FunctionDictionary | 2 #define __DEFINED__SkPdfType0FunctionDictionary |
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 0 function dictionary |
8 class SkPdfType0FunctionDictionary : public SkPdfDictionary { | 9 class SkPdfType0FunctionDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kType0FunctionDictionary_SkPd
fObjectType;} | 11 virtual SkPdfObjectType getType() const { return kType0FunctionDictionary_SkPd
fObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType0Fu
nctionDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType0Fu
nctionDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfType0FunctionDictionary* asType0FunctionDictionary() {return this
;} | 14 virtual SkPdfType0FunctionDictionary* asType0FunctionDictionary() {return this
;} |
14 virtual const SkPdfType0FunctionDictionary* asType0FunctionDictionary() const
{return this;} | 15 virtual const SkPdfType0FunctionDictionary* asType0FunctionDictionary() 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 Loading... |
514 | 515 |
515 public: | 516 public: |
516 private: | 517 private: |
517 public: | 518 public: |
518 SkPdfType0FunctionDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf
Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfType0FunctionDictionary(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 SkPdfType0FunctionDictionary& operator=(const SkPdfType0FunctionDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} | 523 SkPdfType0FunctionDictionary& operator=(const SkPdfType0FunctionDictionary& fr
om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret
urn *this;} |
523 | 524 |
| 525 /** (Required) An array of m positive integers specifying the number of samples |
| 526 * in each input dimension of the sample table. |
| 527 **/ |
| 528 bool has_Size() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size"
, "", NULL)); |
| 530 } |
| 531 |
524 SkPdfArray Size() const { | 532 SkPdfArray Size() const { |
525 SkPdfArray ret; | 533 SkPdfArray ret; |
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "",
&ret)) return ret; | 534 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "",
&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 /** (Required) The number of bits used to represent each sample. (If the functio
n |
| 540 * has multiple output values, each one occupies BitsPerSample bits.) Valid |
| 541 * values are 1, 2, 4, 8, 12, 16, 24, and 32. |
| 542 **/ |
| 543 bool has_BitsPerSample() const { |
| 544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsP
erSample", "", NULL)); |
| 545 } |
| 546 |
531 long BitsPerSample() const { | 547 long BitsPerSample() const { |
532 long ret; | 548 long ret; |
533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerSamp
le", "", &ret)) return ret; | 549 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerSamp
le", "", &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 0; | 551 return 0; |
536 } | 552 } |
537 | 553 |
| 554 /** (Optional) The order of interpolation between samples. Valid values are 1 |
| 555 * and 3, specifying linear and cubic spline interpolation, respectively. (See
im- |
| 556 * plementation note 26 in Appendix H.) Default value: 1. |
| 557 **/ |
| 558 bool has_Order() const { |
| 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Order
", "", NULL)); |
| 560 } |
| 561 |
538 long Order() const { | 562 long Order() const { |
539 long ret; | 563 long ret; |
540 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Order", "",
&ret)) return ret; | 564 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Order", "",
&ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 565 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return 0; | 566 return 0; |
543 } | 567 } |
544 | 568 |
| 569 /** (Optional) An array of 2 x m numbers specifying the linear mapping of input |
| 570 * values into the domain of the function's sample table. Default value: |
| 571 * [0 (Size0 - 1) 0 (Size1 - 1) ...]. |
| 572 **/ |
| 573 bool has_Encode() const { |
| 574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encod
e", "", NULL)); |
| 575 } |
| 576 |
545 SkPdfArray Encode() const { | 577 SkPdfArray Encode() const { |
546 SkPdfArray ret; | 578 SkPdfArray ret; |
547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encode", "
", &ret)) return ret; | 579 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encode", "
", &ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 580 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return SkPdfArray(); | 581 return SkPdfArray(); |
550 } | 582 } |
551 | 583 |
| 584 /** (Optional) An array of 2 x n numbers specifying the linear mapping of sam- |
| 585 * ple values into the range appropriate for the function's output values. Defa
ult |
| 586 * value: same as the value of Range. |
| 587 **/ |
| 588 bool has_Decode() const { |
| 589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decod
e", "", NULL)); |
| 590 } |
| 591 |
552 SkPdfArray Decode() const { | 592 SkPdfArray Decode() const { |
553 SkPdfArray ret; | 593 SkPdfArray ret; |
554 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "
", &ret)) return ret; | 594 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "
", &ret)) return ret; |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
556 return SkPdfArray(); | 596 return SkPdfArray(); |
557 } | 597 } |
558 | 598 |
559 }; | 599 }; |
560 | 600 |
561 #endif // __DEFINED__SkPdfType0FunctionDictionary | 601 #endif // __DEFINED__SkPdfType0FunctionDictionary |
OLD | NEW |