OLD | NEW |
1 #ifndef __DEFINED__SkPdfBeadDictionary | 1 #ifndef __DEFINED__SkPdfBeadDictionary |
2 #define __DEFINED__SkPdfBeadDictionary | 2 #define __DEFINED__SkPdfBeadDictionary |
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 // Entries in a bead dictionary | 9 // Entries in a bead dictionary |
10 class SkPdfBeadDictionary : public SkPdfDictionary { | 10 class SkPdfBeadDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfBeadDictionary& operator=(const SkPdfBeadDictionary& from) {this->fPodofo
Doc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} | 526 SkPdfBeadDictionary& operator=(const SkPdfBeadDictionary& from) {this->fPodofo
Doc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} |
527 | 527 |
528 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be | 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be |
529 * Bead for a bead dictionary. | 529 * Bead for a bead dictionary. |
530 **/ | 530 **/ |
531 bool has_Type() const { | 531 bool has_Type() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string Type() const { | 535 std::string Type() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Required for the first bead of a thread; optional for all others; must be a
n indirect refer- | 536 /** (Required for the first bead of a thread; optional for all others; must be a
n indirect refer- |
543 * ence) The thread to which this bead belongs. | 537 * ence) The thread to which this bead belongs. |
544 * Note: In PDF 1.1, this entry is permitted only for the first bead of a threa
d. In PDF 1.2 | 538 * Note: In PDF 1.1, this entry is permitted only for the first bead of a threa
d. In PDF 1.2 |
545 * and higher, it is permitted for any bead but required only for the first. | 539 * and higher, it is permitted for any bead but required only for the first. |
546 **/ | 540 **/ |
547 bool has_T() const { | 541 bool has_T() const { |
548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); | 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", NULL)); |
549 } | 543 } |
550 | 544 |
551 SkPdfDictionary* T() const { | 545 SkPdfDictionary* T() const; |
552 SkPdfDictionary* ret; | |
553 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "
", &ret)) return ret; | |
554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
555 return NULL; | |
556 } | |
557 | |
558 /** (Required; must be an indirect reference) The next bead in the thread. In th
e last bead, | 546 /** (Required; must be an indirect reference) The next bead in the thread. In th
e last bead, |
559 * this entry points to the first. | 547 * this entry points to the first. |
560 **/ | 548 **/ |
561 bool has_N() const { | 549 bool has_N() const { |
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", NULL)); | 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", NULL)); |
563 } | 551 } |
564 | 552 |
565 SkPdfDictionary* N() const { | 553 SkPdfDictionary* N() const; |
566 SkPdfDictionary* ret; | |
567 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", &ret)) return ret; | |
568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
569 return NULL; | |
570 } | |
571 | |
572 /** (Required; must be an indirect reference) The previous bead in the thread. I
n the first | 554 /** (Required; must be an indirect reference) The previous bead in the thread. I
n the first |
573 * bead, this entry points to the last. | 555 * bead, this entry points to the last. |
574 **/ | 556 **/ |
575 bool has_V() const { | 557 bool has_V() const { |
576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", NULL)); | 558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", NULL)); |
577 } | 559 } |
578 | 560 |
579 SkPdfDictionary* V() const { | 561 SkPdfDictionary* V() const; |
580 SkPdfDictionary* ret; | |
581 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "
", &ret)) return ret; | |
582 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
583 return NULL; | |
584 } | |
585 | |
586 /** (Required; must be an indirect reference) The page object representing the p
age on | 562 /** (Required; must be an indirect reference) The page object representing the p
age on |
587 * which this bead appears. | 563 * which this bead appears. |
588 **/ | 564 **/ |
589 bool has_P() const { | 565 bool has_P() const { |
590 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "
", NULL)); | 566 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "
", NULL)); |
591 } | 567 } |
592 | 568 |
593 SkPdfDictionary* P() const { | 569 SkPdfDictionary* P() const; |
594 SkPdfDictionary* ret; | |
595 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "
", &ret)) return ret; | |
596 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
597 return NULL; | |
598 } | |
599 | |
600 /** (Required) A rectangle specifying the location of this bead on the page. | 570 /** (Required) A rectangle specifying the location of this bead on the page. |
601 **/ | 571 **/ |
602 bool has_R() const { | 572 bool has_R() const { |
603 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); | 573 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); |
604 } | 574 } |
605 | 575 |
606 SkRect* R() const { | 576 SkRect* R() const; |
607 SkRect* ret; | |
608 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &
ret)) return ret; | |
609 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
610 return NULL; | |
611 } | |
612 | |
613 }; | 577 }; |
614 | 578 |
615 #endif // __DEFINED__SkPdfBeadDictionary | 579 #endif // __DEFINED__SkPdfBeadDictionary |
OLD | NEW |