OLD | NEW |
1 #ifndef __DEFINED__SkPdfAppearanceDictionary | 1 #ifndef __DEFINED__SkPdfAppearanceDictionary |
2 #define __DEFINED__SkPdfAppearanceDictionary | 2 #define __DEFINED__SkPdfAppearanceDictionary |
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 // Entries in an appearance dictionary | 8 // Entries in an appearance dictionary |
9 class SkPdfAppearanceDictionary : public SkPdfDictionary { | 9 class SkPdfAppearanceDictionary : public SkPdfDictionary { |
10 public: | 10 public: |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 virtual SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() {return NU
LL;} | 156 virtual SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() {return NU
LL;} |
157 virtual const SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() cons
t {return NULL;} | 157 virtual const SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() cons
t {return NULL;} |
158 | 158 |
159 virtual SkPdfFontDictionary* asFontDictionary() {return NULL;} | 159 virtual SkPdfFontDictionary* asFontDictionary() {return NULL;} |
160 virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;} | 160 virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;} |
161 | 161 |
162 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} | 162 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;} |
163 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} | 163 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL
;} |
164 | 164 |
165 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} | |
166 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} | |
167 | |
168 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} | 165 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} |
169 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} | 166 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} |
170 | 167 |
| 168 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} |
| 169 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} |
| 170 |
171 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} | 171 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} |
172 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} | 172 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} |
173 | 173 |
174 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} | 174 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} |
175 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} | 175 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} |
176 | 176 |
177 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} | 177 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} |
178 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} | 178 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} |
179 | 179 |
180 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur
n NULL;} | 180 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur
n NULL;} |
181 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary()
const {return NULL;} | 181 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary()
const {return NULL;} |
182 | 182 |
183 virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {r
eturn NULL;} | 183 virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {r
eturn NULL;} |
184 virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionar
y() const {return NULL;} | 184 virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionar
y() const {return NULL;} |
185 | 185 |
186 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NU
LL;} | 186 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NU
LL;} |
187 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() cons
t {return NULL;} | 187 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() cons
t {return NULL;} |
188 | 188 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 bool has_N() const { | 527 bool has_N() const { |
528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", NULL)); | 528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", NULL)); |
529 } | 529 } |
530 | 530 |
531 bool isNAStream() const { | 531 bool isNAStream() const { |
532 SkPdfObject* ret = NULL; | 532 SkPdfObject* ret = NULL; |
533 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "",
&ret)) return false; | 533 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "",
&ret)) return false; |
534 return ret->podofo()->HasStream(); | 534 return ret->podofo()->HasStream(); |
535 } | 535 } |
536 | 536 |
537 SkPdfStream getNAsStream() const { | 537 SkPdfStream* getNAsStream() const { |
538 SkPdfStream ret = SkPdfStream(); | 538 SkPdfStream* ret = NULL; |
539 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &
ret)) return ret; | 539 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &
ret)) return ret; |
540 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 540 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
541 return SkPdfStream(); | 541 return NULL; |
542 } | 542 } |
543 | 543 |
544 bool isNADictionary() const { | 544 bool isNADictionary() const { |
545 SkPdfObject* ret = NULL; | 545 SkPdfObject* ret = NULL; |
546 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "",
&ret)) return false; | 546 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "",
&ret)) return false; |
547 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 547 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
548 } | 548 } |
549 | 549 |
550 SkPdfDictionary* getNAsDictionary() const { | 550 SkPdfDictionary* getNAsDictionary() const { |
551 SkPdfDictionary* ret = NULL; | 551 SkPdfDictionary* ret = NULL; |
552 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", &ret)) return ret; | 552 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "
", &ret)) return ret; |
553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
554 return NULL; | 554 return NULL; |
555 } | 555 } |
556 | 556 |
557 /** (Optional) The annotation's rollover appearance. Default value: the value of | 557 /** (Optional) The annotation's rollover appearance. Default value: the value of |
558 * the N entry. | 558 * the N entry. |
559 **/ | 559 **/ |
560 bool has_R() const { | 560 bool has_R() const { |
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); | 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); |
562 } | 562 } |
563 | 563 |
564 bool isRAStream() const { | 564 bool isRAStream() const { |
565 SkPdfObject* ret = NULL; | 565 SkPdfObject* ret = NULL; |
566 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; | 566 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; |
567 return ret->podofo()->HasStream(); | 567 return ret->podofo()->HasStream(); |
568 } | 568 } |
569 | 569 |
570 SkPdfStream getRAsStream() const { | 570 SkPdfStream* getRAsStream() const { |
571 SkPdfStream ret = SkPdfStream(); | 571 SkPdfStream* ret = NULL; |
572 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &
ret)) return ret; | 572 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &
ret)) return ret; |
573 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 573 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
574 return SkPdfStream(); | 574 return NULL; |
575 } | 575 } |
576 | 576 |
577 bool isRADictionary() const { | 577 bool isRADictionary() const { |
578 SkPdfObject* ret = NULL; | 578 SkPdfObject* ret = NULL; |
579 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; | 579 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "",
&ret)) return false; |
580 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 580 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
581 } | 581 } |
582 | 582 |
583 SkPdfDictionary* getRAsDictionary() const { | 583 SkPdfDictionary* getRAsDictionary() const { |
584 SkPdfDictionary* ret = NULL; | 584 SkPdfDictionary* ret = NULL; |
585 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", &ret)) return ret; | 585 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", &ret)) return ret; |
586 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 586 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
587 return NULL; | 587 return NULL; |
588 } | 588 } |
589 | 589 |
590 /** (Optional) The annotation's down appearance. Default value: the value of the | 590 /** (Optional) The annotation's down appearance. Default value: the value of the |
591 * N entry. | 591 * N entry. |
592 **/ | 592 **/ |
593 bool has_D() const { | 593 bool has_D() const { |
594 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", NULL)); | 594 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", NULL)); |
595 } | 595 } |
596 | 596 |
597 bool isDAStream() const { | 597 bool isDAStream() const { |
598 SkPdfObject* ret = NULL; | 598 SkPdfObject* ret = NULL; |
599 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "",
&ret)) return false; | 599 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "",
&ret)) return false; |
600 return ret->podofo()->HasStream(); | 600 return ret->podofo()->HasStream(); |
601 } | 601 } |
602 | 602 |
603 SkPdfStream getDAsStream() const { | 603 SkPdfStream* getDAsStream() const { |
604 SkPdfStream ret = SkPdfStream(); | 604 SkPdfStream* ret = NULL; |
605 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &
ret)) return ret; | 605 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &
ret)) return ret; |
606 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 606 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
607 return SkPdfStream(); | 607 return NULL; |
608 } | 608 } |
609 | 609 |
610 bool isDADictionary() const { | 610 bool isDADictionary() const { |
611 SkPdfObject* ret = NULL; | 611 SkPdfObject* ret = NULL; |
612 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "",
&ret)) return false; | 612 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "",
&ret)) return false; |
613 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 613 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
614 } | 614 } |
615 | 615 |
616 SkPdfDictionary* getDAsDictionary() const { | 616 SkPdfDictionary* getDAsDictionary() const { |
617 SkPdfDictionary* ret = NULL; | 617 SkPdfDictionary* ret = NULL; |
618 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", &ret)) return ret; | 618 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", &ret)) return ret; |
619 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 619 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
620 return NULL; | 620 return NULL; |
621 } | 621 } |
622 | 622 |
623 }; | 623 }; |
624 | 624 |
625 #endif // __DEFINED__SkPdfAppearanceDictionary | 625 #endif // __DEFINED__SkPdfAppearanceDictionary |
OLD | NEW |