| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfWebCaptureImageSetDictionary | 1 #ifndef __DEFINED__SkPdfWebCaptureImageSetDictionary |
| 2 #define __DEFINED__SkPdfWebCaptureImageSetDictionary | 2 #define __DEFINED__SkPdfWebCaptureImageSetDictionary |
| 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 Web Capture image set |
| 8 class SkPdfWebCaptureImageSetDictionary : public SkPdfDictionary { | 9 class SkPdfWebCaptureImageSetDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kWebCaptureImageSetDictionary
_SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kWebCaptureImageSetDictionary
_SkPdfObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWebCapt
ureImageSetDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWebCapt
ureImageSetDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() {r
eturn this;} | 14 virtual SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() {r
eturn this;} |
| 14 virtual const SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionar
y() const {return this;} | 15 virtual const SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionar
y() 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 SkPdfWebCaptureImageSetDictionary(const PdfMemDocument* podofoDoc = NULL, cons
t PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfWebCaptureImageSetDictionary(const PdfMemDocument* podofoDoc = NULL, cons
t 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 SkPdfWebCaptureImageSetDictionary& operator=(const SkPdfWebCaptureImageSetDict
ionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodo
foObj; return *this;} | 523 SkPdfWebCaptureImageSetDictionary& operator=(const SkPdfWebCaptureImageSetDict
ionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodo
foObj; return *this;} |
| 523 | 524 |
| 525 /** (Required) The subtype of content set that this dictionary describes; must b
e SIS ("Spider |
| 526 * image set") for an image set. |
| 527 **/ |
| 528 bool has_S() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 530 } |
| 531 |
| 524 std::string S() const { | 532 std::string S() const { |
| 525 std::string ret; | 533 std::string ret; |
| 526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) 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 ""; | 536 return ""; |
| 529 } | 537 } |
| 530 | 538 |
| 539 /** (Required) The reference counts (see below) for the image XObjects belonging
to the |
| 540 * image set. For an image set containing a single XObject, the value is simply
the integer |
| 541 * reference count for that XObject. If the image set contains multiple XObject
s, the value is |
| 542 * an array of reference counts parallel to the O array (see Table 9.33 on page
668); that is, |
| 543 * each element in the R array holds the reference count for the image XObject
at the corre- |
| 544 * sponding position in the O array. |
| 545 **/ |
| 546 bool has_R() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); |
| 548 } |
| 549 |
| 531 bool isRAInteger() const { | 550 bool isRAInteger() const { |
| 532 SkPdfObject* ret = NULL; | 551 SkPdfObject* ret = NULL; |
| 533 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; | 552 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; |
| 534 return ret->podofo()->GetDataType() == ePdfDataType_Number; | 553 return ret->podofo()->GetDataType() == ePdfDataType_Number; |
| 535 } | 554 } |
| 536 | 555 |
| 537 long getRAsInteger() const { | 556 long getRAsInteger() const { |
| 538 long ret = 0; | 557 long ret = 0; |
| 539 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &re
t)) return ret; | 558 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &re
t)) return ret; |
| 540 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 559 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 541 return 0; | 560 return 0; |
| 542 } | 561 } |
| 543 | 562 |
| 544 bool isRAArray() const { | 563 bool isRAArray() const { |
| 545 SkPdfObject* ret = NULL; | 564 SkPdfObject* ret = NULL; |
| 546 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; | 565 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; |
| 547 return ret->podofo()->GetDataType() == ePdfDataType_Array; | 566 return ret->podofo()->GetDataType() == ePdfDataType_Array; |
| 548 } | 567 } |
| 549 | 568 |
| 550 SkPdfArray getRAsArray() const { | 569 SkPdfArray getRAsArray() const { |
| 551 SkPdfArray ret = SkPdfArray(); | 570 SkPdfArray ret = SkPdfArray(); |
| 552 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &r
et)) return ret; | 571 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &r
et)) return ret; |
| 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 572 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 554 return SkPdfArray(); | 573 return SkPdfArray(); |
| 555 } | 574 } |
| 556 | 575 |
| 557 }; | 576 }; |
| 558 | 577 |
| 559 #endif // __DEFINED__SkPdfWebCaptureImageSetDictionary | 578 #endif // __DEFINED__SkPdfWebCaptureImageSetDictionary |
| OLD | NEW |