| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfLzwdecodeAndFlatedecodeFiltersDictionary | 1 #ifndef __DEFINED__SkPdfLzwdecodeAndFlatedecodeFiltersDictionary |
| 2 #define __DEFINED__SkPdfLzwdecodeAndFlatedecodeFiltersDictionary | 2 #define __DEFINED__SkPdfLzwdecodeAndFlatedecodeFiltersDictionary |
| 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 // Optional parameters for LZWDecode and FlateDecode filters |
| 8 class SkPdfLzwdecodeAndFlatedecodeFiltersDictionary : public SkPdfDictionary { | 9 class SkPdfLzwdecodeAndFlatedecodeFiltersDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kLzwdecodeAndFlatedecodeFilte
rsDictionary_SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kLzwdecodeAndFlatedecodeFilte
rsDictionary_SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kLzwdeco
deAndFlatedecodeFiltersDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kLzwdeco
deAndFlatedecodeFiltersDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedeco
deFiltersDictionary() {return this;} | 14 virtual SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedeco
deFiltersDictionary() {return this;} |
| 14 virtual const SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFla
tedecodeFiltersDictionary() const {return this;} | 15 virtual const SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFla
tedecodeFiltersDictionary() 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 SkPdfLzwdecodeAndFlatedecodeFiltersDictionary(const PdfMemDocument* podofoDoc
= NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoOb
j) {} | 519 SkPdfLzwdecodeAndFlatedecodeFiltersDictionary(const PdfMemDocument* podofoDoc
= NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoOb
j) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfLzwdecodeAndFlatedecodeFiltersDictionary& operator=(const SkPdfLzwdecodeA
ndFlatedecodeFiltersDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this-
>fPodofoObj = from.fPodofoObj; return *this;} | 523 SkPdfLzwdecodeAndFlatedecodeFiltersDictionary& operator=(const SkPdfLzwdecodeA
ndFlatedecodeFiltersDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this-
>fPodofoObj = from.fPodofoObj; return *this;} |
| 523 | 524 |
| 525 /** ()A code that selects the predictor algorithm, if any. If the value of this
entry |
| 526 * is 1, the filter assumes that the normal algorithm was used to encode the da
ta, |
| 527 * without prediction. If the value is greater than 1, the filter assumes that
the |
| 528 * data was differenced before being encoded, and Predictor selects the predic- |
| 529 * tor algorithm. For more information regarding Predictor values greater |
| 530 * than 1, see "LZW and Flate Predictor Functions," below. Default value: 1. |
| 531 **/ |
| 532 bool has_Predictor() const { |
| 533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Predi
ctor", "", NULL)); |
| 534 } |
| 535 |
| 524 long Predictor() const { | 536 long Predictor() const { |
| 525 long ret; | 537 long ret; |
| 526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Predictor",
"", &ret)) return ret; | 538 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Predictor",
"", &ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 539 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return 0; | 540 return 0; |
| 529 } | 541 } |
| 530 | 542 |
| 543 /** (Used only if Predictor is greater than 1) The number of interleaved color c
om- |
| 544 * ponents per sample. Valid values are 1 to 4 in PDF 1.2 or earlier, and 1 or |
| 545 * greater in PDF 1.3 or later. Default value: 1. |
| 546 **/ |
| 547 bool has_Colors() const { |
| 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color
s", "", NULL)); |
| 549 } |
| 550 |
| 531 long Colors() const { | 551 long Colors() const { |
| 532 long ret; | 552 long ret; |
| 533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colors", ""
, &ret)) return ret; | 553 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colors", ""
, &ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return 0; | 555 return 0; |
| 536 } | 556 } |
| 537 | 557 |
| 558 /** (Used only if Predictor is greater than 1) The number of bits used to repres
ent |
| 559 * each color component in a sample. Valid values are 1, 2, 4, and 8. Default |
| 560 * value: 8. |
| 561 **/ |
| 562 bool has_BitsPerComponent() const { |
| 563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsP
erComponent", "", NULL)); |
| 564 } |
| 565 |
| 538 long BitsPerComponent() const { | 566 long BitsPerComponent() const { |
| 539 long ret; | 567 long ret; |
| 540 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComp
onent", "", &ret)) return ret; | 568 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComp
onent", "", &ret)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return 0; | 570 return 0; |
| 543 } | 571 } |
| 544 | 572 |
| 573 /** (Used only if Predictor is greater than 1) The number of samples in each row
. |
| 574 * Default value: 1. |
| 575 **/ |
| 576 bool has_Columns() const { |
| 577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colum
ns", "", NULL)); |
| 578 } |
| 579 |
| 545 long Columns() const { | 580 long Columns() const { |
| 546 long ret; | 581 long ret; |
| 547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "
", &ret)) return ret; | 582 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "
", &ret)) return ret; |
| 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 583 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 549 return 0; | 584 return 0; |
| 550 } | 585 } |
| 551 | 586 |
| 587 /** (LZWDecode only) An indication of when to increase the code length. If the |
| 588 * value of this entry is 0, code length increases are postponed as long as pos
- |
| 589 * sible. If it is 1, they occur one code early. This parameter is included bec
ause |
| 590 * LZW sample code distributed by some vendors increases the code length one |
| 591 * code earlier than necessary. Default value: 1. |
| 592 **/ |
| 593 bool has_EarlyChange() const { |
| 594 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Early
Change", "", NULL)); |
| 595 } |
| 596 |
| 552 long EarlyChange() const { | 597 long EarlyChange() const { |
| 553 long ret; | 598 long ret; |
| 554 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EarlyChange
", "", &ret)) return ret; | 599 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EarlyChange
", "", &ret)) return ret; |
| 555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 600 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 556 return 0; | 601 return 0; |
| 557 } | 602 } |
| 558 | 603 |
| 559 }; | 604 }; |
| 560 | 605 |
| 561 #endif // __DEFINED__SkPdfLzwdecodeAndFlatedecodeFiltersDictionary | 606 #endif // __DEFINED__SkPdfLzwdecodeAndFlatedecodeFiltersDictionary |
| OLD | NEW |