OLD | NEW |
1 #ifndef __DEFINED__SkPdfCcittfaxdecodeFilterDictionary | 1 #ifndef __DEFINED__SkPdfCcittfaxdecodeFilterDictionary |
2 #define __DEFINED__SkPdfCcittfaxdecodeFilterDictionary | 2 #define __DEFINED__SkPdfCcittfaxdecodeFilterDictionary |
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 the CCITTFaxDecode filter |
8 class SkPdfCcittfaxdecodeFilterDictionary : public SkPdfDictionary { | 9 class SkPdfCcittfaxdecodeFilterDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kCcittfaxdecodeFilterDictiona
ry_SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kCcittfaxdecodeFilterDictiona
ry_SkPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCcittfa
xdecodeFilterDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCcittfa
xdecodeFilterDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary(
) {return this;} | 14 virtual SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary(
) {return this;} |
14 virtual const SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDicti
onary() const {return this;} | 15 virtual const SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDicti
onary() 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 SkPdfCcittfaxdecodeFilterDictionary(const PdfMemDocument* podofoDoc = NULL, co
nst PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfCcittfaxdecodeFilterDictionary(const PdfMemDocument* podofoDoc = NULL, co
nst PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfCcittfaxdecodeFilterDictionary& operator=(const SkPdfCcittfaxdecodeFilter
Dictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.f
PodofoObj; return *this;} | 523 SkPdfCcittfaxdecodeFilterDictionary& operator=(const SkPdfCcittfaxdecodeFilter
Dictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.f
PodofoObj; return *this;} |
523 | 524 |
| 525 /** ()A code identifying the encoding scheme used: |
| 526 * <0 Pure two-dimensional encoding (Group 4) |
| 527 * 0 Pure one-dimensional encoding (Group 3, 1-D) |
| 528 * >0 Mixed one- and two-dimensional encoding (Group 3, |
| 529 * 2-D), in which a line encoded one-dimensionally can be |
| 530 * followed by at most K - 1 lines encoded two-dimensionally |
| 531 * The filter distinguishes among negative, zero, and positive values of |
| 532 * K to determine how to interpret the encoded data; however, it does |
| 533 * not distinguish between different positive K values. Default value: 0. |
| 534 **/ |
| 535 bool has_K() const { |
| 536 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "
", NULL)); |
| 537 } |
| 538 |
524 long K() const { | 539 long K() const { |
525 long ret; | 540 long ret; |
526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &re
t)) return ret; | 541 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &re
t)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 542 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return 0; | 543 return 0; |
529 } | 544 } |
530 | 545 |
| 546 /** ()A flag indicating whether end-of-line bit patterns are required to be |
| 547 * present in the encoding. The CCITTFaxDecode filter always accepts |
| 548 * end-of-line bit patterns, but requires them only if EndOfLine is true. |
| 549 * Default value: false. |
| 550 **/ |
| 551 bool has_EndOfLine() const { |
| 552 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOf
Line", "", NULL)); |
| 553 } |
| 554 |
531 bool EndOfLine() const { | 555 bool EndOfLine() const { |
532 bool ret; | 556 bool ret; |
533 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine",
"", &ret)) return ret; | 557 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine",
"", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 558 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return false; | 559 return false; |
536 } | 560 } |
537 | 561 |
| 562 /** ()A flag indicating whether the filter expects extra 0 bits before each |
| 563 * encoded line so that the line begins on a byte boundary. If true, the |
| 564 * filter skips over encoded bits to begin decoding each line at a byte |
| 565 * boundary. If false, the filter does not expect extra bits in the encod- |
| 566 * ed representation. Default value: false. |
| 567 **/ |
| 568 bool has_EncodedByteAlign() const { |
| 569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encod
edByteAlign", "", NULL)); |
| 570 } |
| 571 |
538 bool EncodedByteAlign() const { | 572 bool EncodedByteAlign() const { |
539 bool ret; | 573 bool ret; |
540 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByte
Align", "", &ret)) return ret; | 574 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByte
Align", "", &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 575 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return false; | 576 return false; |
543 } | 577 } |
544 | 578 |
| 579 /** ()The width of the image in pixels. If the value is not a multiple of 8, |
| 580 * the filter adjusts the width of the unencoded image to the next mul- |
| 581 * tiple of 8, so that each line starts on a byte boundary. Default value: |
| 582 * 1728. |
| 583 **/ |
| 584 bool has_Columns() const { |
| 585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colum
ns", "", NULL)); |
| 586 } |
| 587 |
545 long Columns() const { | 588 long Columns() const { |
546 long ret; | 589 long ret; |
547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "
", &ret)) return ret; | 590 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "
", &ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 591 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return 0; | 592 return 0; |
550 } | 593 } |
551 | 594 |
| 595 /** ()The height of the image in scan lines. If the value is 0 or absent, the |
| 596 * image's height is not predetermined, and the encoded data must be |
| 597 * terminated by an end-of-block bit pattern or by the end of the fil- |
| 598 * ter's data. Default value: 0. |
| 599 **/ |
| 600 bool has_Rows() const { |
| 601 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows"
, "", NULL)); |
| 602 } |
| 603 |
552 long Rows() const { | 604 long Rows() const { |
553 long ret; | 605 long ret; |
554 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "",
&ret)) return ret; | 606 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "",
&ret)) return ret; |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 607 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
556 return 0; | 608 return 0; |
557 } | 609 } |
558 | 610 |
| 611 /** ()A flag indicating whether the filter expects the encoded data to be |
| 612 * terminated by an end-of-block pattern, overriding the Rows pa- |
| 613 * rameter. If false, the filter stops when it has decoded the number of |
| 614 * lines indicated by Rows or when its data has been exhausted, which- |
| 615 * ever occurs first. The end-of-block pattern is the CCITT end-of- |
| 616 * facsimile-block (EOFB) or return-to-control (RTC) appropriate for |
| 617 * the K parameter. Default value: true. |
| 618 **/ |
| 619 bool has_EndOfBlock() const { |
| 620 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOf
Block", "", NULL)); |
| 621 } |
| 622 |
559 bool EndOfBlock() const { | 623 bool EndOfBlock() const { |
560 bool ret; | 624 bool ret; |
561 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock"
, "", &ret)) return ret; | 625 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock"
, "", &ret)) return ret; |
562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 626 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
563 return false; | 627 return false; |
564 } | 628 } |
565 | 629 |
| 630 /** ()A flag indicating whether 1 bits are to be interpreted as black pixels |
| 631 * and 0 bits as white pixels, the reverse of the normal PDF convention |
| 632 * for image data. Default value: false. |
| 633 **/ |
| 634 bool has_BlackIs1() const { |
| 635 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Black
Is1", "", NULL)); |
| 636 } |
| 637 |
566 bool BlackIs1() const { | 638 bool BlackIs1() const { |
567 bool ret; | 639 bool ret; |
568 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1",
"", &ret)) return ret; | 640 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1",
"", &ret)) return ret; |
569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 641 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
570 return false; | 642 return false; |
571 } | 643 } |
572 | 644 |
| 645 /** ()The number of damaged rows of data to be tolerated before an |
| 646 * error occurs. This entry applies only if EndOfLine is true and K is |
| 647 * nonnegative. Tolerating a damaged row means locating its end in |
| 648 * the encoded data by searching for an EndOfLine pattern and then |
| 649 * substituting decoded data from the previous row if the previous |
| 650 * row was not damaged, or a white scan line if the previous row was |
| 651 * also damaged. Default value: 0. |
| 652 **/ |
| 653 bool has_DamagedRowsBeforeError() const { |
| 654 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Damag
edRowsBeforeError", "", NULL)); |
| 655 } |
| 656 |
573 long DamagedRowsBeforeError() const { | 657 long DamagedRowsBeforeError() const { |
574 long ret; | 658 long ret; |
575 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRows
BeforeError", "", &ret)) return ret; | 659 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRows
BeforeError", "", &ret)) return ret; |
576 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 660 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
577 return 0; | 661 return 0; |
578 } | 662 } |
579 | 663 |
580 }; | 664 }; |
581 | 665 |
582 #endif // __DEFINED__SkPdfCcittfaxdecodeFilterDictionary | 666 #endif // __DEFINED__SkPdfCcittfaxdecodeFilterDictionary |
OLD | NEW |