Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: experimental/PdfViewer/SkPdfResourceDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfResourceDictionary 1 #ifndef __DEFINED__SkPdfResourceDictionary
2 #define __DEFINED__SkPdfResourceDictionary 2 #define __DEFINED__SkPdfResourceDictionary
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 a resource dictionary
8 class SkPdfResourceDictionary : public SkPdfDictionary { 9 class SkPdfResourceDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kResourceDictionary_SkPdfObje ctType;} 11 virtual SkPdfObjectType getType() const { return kResourceDictionary_SkPdfObje ctType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kResourc eDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kResourc eDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfResourceDictionary* asResourceDictionary() {return this;} 14 virtual SkPdfResourceDictionary* asResourceDictionary() {return this;}
14 virtual const SkPdfResourceDictionary* asResourceDictionary() const {return th is;} 15 virtual const SkPdfResourceDictionary* asResourceDictionary() const {return th is;}
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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfResourceDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfResourceDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfResourceDictionary& operator=(const SkPdfResourceDictionary& from) {this- >fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this; } 523 SkPdfResourceDictionary& operator=(const SkPdfResourceDictionary& from) {this- >fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this; }
523 524
525 /** (Optional) A dictionary mapping resource names to graphics state parameter
526 * dictionaries (see Section 4.3.4, "Graphics State Parameter Dictionaries").
527 **/
528 bool has_ExtGState() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGS tate", "", NULL));
530 }
531
524 SkPdfDictionary* ExtGState() const { 532 SkPdfDictionary* ExtGState() const {
525 SkPdfDictionary* ret; 533 SkPdfDictionary* ret;
526 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGS tate", "", &ret)) return ret; 534 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGS tate", "", &ret)) 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 NULL; 536 return NULL;
529 } 537 }
530 538
539 /** (Optional) A dictionary mapping each resource name to either the name of a
540 * device-dependent color space or an array describing a color space (see Sec-
541 * tion 4.5, "Color Spaces").
542 **/
543 bool has_ColorSpace() const {
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color Space", "", NULL));
545 }
546
531 SkPdfDictionary* ColorSpace() const { 547 SkPdfDictionary* ColorSpace() const {
532 SkPdfDictionary* ret; 548 SkPdfDictionary* ret;
533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color Space", "", &ret)) return ret; 549 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color Space", "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 550 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return NULL; 551 return NULL;
536 } 552 }
537 553
554 /** (Optional) A dictionary mapping resource names to pattern objects (see Sec-
555 * tion 4.6, "Patterns").
556 **/
557 bool has_Pattern() const {
558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte rn", "", NULL));
559 }
560
538 SkPdfDictionary* Pattern() const { 561 SkPdfDictionary* Pattern() const {
539 SkPdfDictionary* ret; 562 SkPdfDictionary* ret;
540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte rn", "", &ret)) return ret; 563 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte rn", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 564 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return NULL; 565 return NULL;
543 } 566 }
544 567
568 /** (Optional; PDF 1.3) A dictionary mapping resource names to shading dic-
569 * tionaries (see "Shading Dictionaries" on page 233).
570 **/
571 bool has_Shading() const {
572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shadi ng", "", NULL));
573 }
574
545 SkPdfDictionary* Shading() const { 575 SkPdfDictionary* Shading() const {
546 SkPdfDictionary* ret; 576 SkPdfDictionary* ret;
547 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shadi ng", "", &ret)) return ret; 577 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shadi ng", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 578 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return NULL; 579 return NULL;
550 } 580 }
551 581
582 /** (Optional) A dictionary mapping resource names to external objects (see Sec-
583 * tion 4.7, "External Objects").
584 **/
585 bool has_XObject() const {
586 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObje ct", "", NULL));
587 }
588
552 SkPdfDictionary* XObject() const { 589 SkPdfDictionary* XObject() const {
553 SkPdfDictionary* ret; 590 SkPdfDictionary* ret;
554 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObje ct", "", &ret)) return ret; 591 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObje ct", "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 592 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return NULL; 593 return NULL;
557 } 594 }
558 595
596 /** (Optional) A dictionary mapping resource names to font dictionaries (see
597 * Chapter 5).
598 **/
599 bool has_Font() const {
600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font" , "", NULL));
601 }
602
559 SkPdfDictionary* Font() const { 603 SkPdfDictionary* Font() const {
560 SkPdfDictionary* ret; 604 SkPdfDictionary* ret;
561 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font" , "", &ret)) return ret; 605 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font" , "", &ret)) return ret;
562 // 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
563 return NULL; 607 return NULL;
564 } 608 }
565 609
610 /** (Optional) An array of predefined procedure set names (see Section 9.1,
611 * "Procedure Sets").
612 **/
613 bool has_ProcSet() const {
614 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcS et", "", NULL));
615 }
616
566 SkPdfArray ProcSet() const { 617 SkPdfArray ProcSet() const {
567 SkPdfArray ret; 618 SkPdfArray ret;
568 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcSet", "", &ret)) return ret; 619 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcSet", "", &ret)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs 620 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return SkPdfArray(); 621 return SkPdfArray();
571 } 622 }
572 623
624 /** (Optional; PDF 1.2) A dictionary mapping resource names to property list
625 * dictionaries for marked content (see Section 9.5.1, "Property Lists").
626 **/
627 bool has_Properties() const {
628 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prope rties", "", NULL));
629 }
630
573 SkPdfDictionary* Properties() const { 631 SkPdfDictionary* Properties() const {
574 SkPdfDictionary* ret; 632 SkPdfDictionary* ret;
575 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prope rties", "", &ret)) return ret; 633 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prope rties", "", &ret)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs 634 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return NULL; 635 return NULL;
578 } 636 }
579 637
580 }; 638 };
581 639
582 #endif // __DEFINED__SkPdfResourceDictionary 640 #endif // __DEFINED__SkPdfResourceDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698