OLD | NEW |
1 #ifndef __DEFINED__SkPdfResourceDictionary | 1 #ifndef __DEFINED__SkPdfResourceDictionary |
2 #define __DEFINED__SkPdfResourceDictionary | 2 #define __DEFINED__SkPdfResourceDictionary |
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 resource dictionary | 9 // Entries in a resource dictionary |
10 class SkPdfResourceDictionary : public SkPdfDictionary { | 10 class SkPdfResourceDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfResourceDictionary& operator=(const SkPdfResourceDictionary& from) {this-
>fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;
} | 526 SkPdfResourceDictionary& operator=(const SkPdfResourceDictionary& from) {this-
>fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;
} |
527 | 527 |
528 /** (Optional) A dictionary mapping resource names to graphics state parameter | 528 /** (Optional) A dictionary mapping resource names to graphics state parameter |
529 * dictionaries (see Section 4.3.4, "Graphics State Parameter Dictionaries"). | 529 * dictionaries (see Section 4.3.4, "Graphics State Parameter Dictionaries"). |
530 **/ | 530 **/ |
531 bool has_ExtGState() const { | 531 bool has_ExtGState() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGS
tate", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGS
tate", "", NULL)); |
533 } | 533 } |
534 | 534 |
535 SkPdfDictionary* ExtGState() const { | 535 SkPdfDictionary* ExtGState() const; |
536 SkPdfDictionary* ret; | |
537 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGS
tate", "", &ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return NULL; | |
540 } | |
541 | |
542 /** (Optional) A dictionary mapping each resource name to either the name of a | 536 /** (Optional) A dictionary mapping each resource name to either the name of a |
543 * device-dependent color space or an array describing a color space (see Sec- | 537 * device-dependent color space or an array describing a color space (see Sec- |
544 * tion 4.5, "Color Spaces"). | 538 * tion 4.5, "Color Spaces"). |
545 **/ | 539 **/ |
546 bool has_ColorSpace() const { | 540 bool has_ColorSpace() const { |
547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color
Space", "", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color
Space", "", NULL)); |
548 } | 542 } |
549 | 543 |
550 SkPdfDictionary* ColorSpace() const { | 544 SkPdfDictionary* ColorSpace() const; |
551 SkPdfDictionary* ret; | |
552 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color
Space", "", &ret)) return ret; | |
553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
554 return NULL; | |
555 } | |
556 | |
557 /** (Optional) A dictionary mapping resource names to pattern objects (see Sec- | 545 /** (Optional) A dictionary mapping resource names to pattern objects (see Sec- |
558 * tion 4.6, "Patterns"). | 546 * tion 4.6, "Patterns"). |
559 **/ | 547 **/ |
560 bool has_Pattern() const { | 548 bool has_Pattern() const { |
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte
rn", "", NULL)); | 549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte
rn", "", NULL)); |
562 } | 550 } |
563 | 551 |
564 SkPdfDictionary* Pattern() const { | 552 SkPdfDictionary* Pattern() const; |
565 SkPdfDictionary* ret; | |
566 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte
rn", "", &ret)) return ret; | |
567 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
568 return NULL; | |
569 } | |
570 | |
571 /** (Optional; PDF 1.3) A dictionary mapping resource names to shading dic- | 553 /** (Optional; PDF 1.3) A dictionary mapping resource names to shading dic- |
572 * tionaries (see "Shading Dictionaries" on page 233). | 554 * tionaries (see "Shading Dictionaries" on page 233). |
573 **/ | 555 **/ |
574 bool has_Shading() const { | 556 bool has_Shading() const { |
575 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shadi
ng", "", NULL)); | 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shadi
ng", "", NULL)); |
576 } | 558 } |
577 | 559 |
578 SkPdfDictionary* Shading() const { | 560 SkPdfDictionary* Shading() const; |
579 SkPdfDictionary* ret; | |
580 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shadi
ng", "", &ret)) return ret; | |
581 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
582 return NULL; | |
583 } | |
584 | |
585 /** (Optional) A dictionary mapping resource names to external objects (see Sec- | 561 /** (Optional) A dictionary mapping resource names to external objects (see Sec- |
586 * tion 4.7, "External Objects"). | 562 * tion 4.7, "External Objects"). |
587 **/ | 563 **/ |
588 bool has_XObject() const { | 564 bool has_XObject() const { |
589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObje
ct", "", NULL)); | 565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObje
ct", "", NULL)); |
590 } | 566 } |
591 | 567 |
592 SkPdfDictionary* XObject() const { | 568 SkPdfDictionary* XObject() const; |
593 SkPdfDictionary* ret; | |
594 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObje
ct", "", &ret)) return ret; | |
595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
596 return NULL; | |
597 } | |
598 | |
599 /** (Optional) A dictionary mapping resource names to font dictionaries (see | 569 /** (Optional) A dictionary mapping resource names to font dictionaries (see |
600 * Chapter 5). | 570 * Chapter 5). |
601 **/ | 571 **/ |
602 bool has_Font() const { | 572 bool has_Font() const { |
603 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font"
, "", NULL)); | 573 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font"
, "", NULL)); |
604 } | 574 } |
605 | 575 |
606 SkPdfDictionary* Font() const { | 576 SkPdfDictionary* Font() const; |
607 SkPdfDictionary* ret; | |
608 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font"
, "", &ret)) return ret; | |
609 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
610 return NULL; | |
611 } | |
612 | |
613 /** (Optional) An array of predefined procedure set names (see Section 9.1, | 577 /** (Optional) An array of predefined procedure set names (see Section 9.1, |
614 * "Procedure Sets"). | 578 * "Procedure Sets"). |
615 **/ | 579 **/ |
616 bool has_ProcSet() const { | 580 bool has_ProcSet() const { |
617 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcS
et", "", NULL)); | 581 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcS
et", "", NULL)); |
618 } | 582 } |
619 | 583 |
620 SkPdfArray* ProcSet() const { | 584 SkPdfArray* ProcSet() const; |
621 SkPdfArray* ret; | |
622 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcSet",
"", &ret)) return ret; | |
623 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
624 return NULL; | |
625 } | |
626 | |
627 /** (Optional; PDF 1.2) A dictionary mapping resource names to property list | 585 /** (Optional; PDF 1.2) A dictionary mapping resource names to property list |
628 * dictionaries for marked content (see Section 9.5.1, "Property Lists"). | 586 * dictionaries for marked content (see Section 9.5.1, "Property Lists"). |
629 **/ | 587 **/ |
630 bool has_Properties() const { | 588 bool has_Properties() const { |
631 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prope
rties", "", NULL)); | 589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prope
rties", "", NULL)); |
632 } | 590 } |
633 | 591 |
634 SkPdfDictionary* Properties() const { | 592 SkPdfDictionary* Properties() const; |
635 SkPdfDictionary* ret; | |
636 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prope
rties", "", &ret)) return ret; | |
637 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
638 return NULL; | |
639 } | |
640 | |
641 }; | 593 }; |
642 | 594 |
643 #endif // __DEFINED__SkPdfResourceDictionary | 595 #endif // __DEFINED__SkPdfResourceDictionary |
OLD | NEW |