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