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

Side by Side Diff: experimental/PdfViewer/SkPdfType16HalftoneDictionary_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__SkPdfType16HalftoneDictionary 1 #ifndef __DEFINED__SkPdfType16HalftoneDictionary
2 #define __DEFINED__SkPdfType16HalftoneDictionary 2 #define __DEFINED__SkPdfType16HalftoneDictionary
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 type 16 halftone dictionary
8 class SkPdfType16HalftoneDictionary : public SkPdfDictionary { 9 class SkPdfType16HalftoneDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kType16HalftoneDictionary_SkP dfObjectType;} 11 virtual SkPdfObjectType getType() const { return kType16HalftoneDictionary_SkP dfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType16H alftoneDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType16H alftoneDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() {return th is;} 14 virtual SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() {return th is;}
14 virtual const SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() cons t {return this;} 15 virtual const SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() cons t {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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfType16HalftoneDictionary(const PdfMemDocument* podofoDoc = NULL, const Pd fObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfType16HalftoneDictionary(const PdfMemDocument* podofoDoc = NULL, const Pd fObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfType16HalftoneDictionary& operator=(const SkPdfType16HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r eturn *this;} 523 SkPdfType16HalftoneDictionary& operator=(const SkPdfType16HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r eturn *this;}
523 524
525 /** (Optional) The type of PDF object that this dictionary describes; if
526 * present, must be Halftone for a halftone dictionary.
527 **/
528 bool has_Type() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL));
530 }
531
524 std::string Type() const { 532 std::string Type() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &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 ""; 536 return "";
529 } 537 }
530 538
539 /** (Required) A code identifying the halftone type that this dictionary
540 * describes; must be 16 for this type of halftone.
541 **/
542 bool has_HalftoneType() const {
543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Halft oneType", "", NULL));
544 }
545
531 long HalftoneType() const { 546 long HalftoneType() const {
532 long ret; 547 long ret;
533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneTyp e", "", &ret)) return ret; 548 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneTyp e", "", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 549 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return 0; 550 return 0;
536 } 551 }
537 552
553 /** (Optional) The name of the halftone dictionary.
554 **/
555 bool has_HalftoneName() const {
556 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Halft oneName", "", NULL));
557 }
558
538 std::string HalftoneName() const { 559 std::string HalftoneName() const {
539 std::string ret; 560 std::string ret;
540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneN ame", "", &ret)) return ret; 561 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneN ame", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 562 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return ""; 563 return "";
543 } 564 }
544 565
566 /** (Required) The width of the first (or only) rectangle in the threshold
567 * array, in device pixels.
568 **/
569 bool has_Width() const {
570 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width ", "", NULL));
571 }
572
545 long Width() const { 573 long Width() const {
546 long ret; 574 long ret;
547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret; 575 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 576 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return 0; 577 return 0;
550 } 578 }
551 579
580 /** (Required) The height of the first (or only) rectangle in the threshold
581 * array, in device pixels.
582 **/
583 bool has_Height() const {
584 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Heigh t", "", NULL));
585 }
586
552 long Height() const { 587 long Height() const {
553 long ret; 588 long ret;
554 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "" , &ret)) return ret; 589 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "" , &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 590 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return 0; 591 return 0;
557 } 592 }
558 593
594 /** (Optional) The width of the optional second rectangle in the threshold
595 * array, in device pixels. If this entry is present, the Height2 entry must
596 * be present as well; if this entry is absent, the Height2 entry must also be
597 * absent and the threshold array has only one rectangle.
598 **/
599 bool has_Width2() const {
600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width 2", "", NULL));
601 }
602
559 long Width2() const { 603 long Width2() const {
560 long ret; 604 long ret;
561 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width2", "" , &ret)) return ret; 605 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width2", "" , &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 0; 607 return 0;
564 } 608 }
565 609
610 /** (Optional) The height of the optional second rectangle in the threshold
611 * array, in device pixels.
612 **/
613 bool has_Height2() const {
614 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Heigh t2", "", NULL));
615 }
616
566 long Height2() const { 617 long Height2() const {
567 long ret; 618 long ret;
568 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height2", " ", &ret)) return ret; 619 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height2", " ", &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 0; 621 return 0;
571 } 622 }
572 623
624 /** (Optional) A transfer function, which overrides the current transfer
625 * function in the graphics state for the same component. This entry is
626 * required if the dictionary is a component of a type 5 halftone (see
627 * "Type 5 Halftones," below) and represents either a nonprimary or
628 * nonstandard primary color component (see Section 6.3, "Transfer
629 * Functions"). The name Identity may be used to specify the identity
630 * function.
631 **/
632 bool has_TransferFunction() const {
633 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trans ferFunction", "", NULL));
634 }
635
573 bool isTransferFunctionAFunction() const { 636 bool isTransferFunctionAFunction() const {
574 SkPdfObject* ret = NULL; 637 SkPdfObject* ret = NULL;
575 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false; 638 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false;
576 return ret->podofo()->GetDataType() == ePdfDataType_Reference; 639 return ret->podofo()->GetDataType() == ePdfDataType_Reference;
577 } 640 }
578 641
579 SkPdfFunction getTransferFunctionAsFunction() const { 642 SkPdfFunction getTransferFunctionAsFunction() const {
580 SkPdfFunction ret = SkPdfFunction(); 643 SkPdfFunction ret = SkPdfFunction();
581 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfe rFunction", "", &ret)) return ret; 644 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfe rFunction", "", &ret)) return ret;
582 // TODO(edisonn): warn about missing required field, assert for known good p dfs 645 // TODO(edisonn): warn about missing required field, assert for known good p dfs
583 return SkPdfFunction(); 646 return SkPdfFunction();
584 } 647 }
585 648
586 bool isTransferFunctionAName() const { 649 bool isTransferFunctionAName() const {
587 SkPdfObject* ret = NULL; 650 SkPdfObject* ret = NULL;
588 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false; 651 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false;
589 return ret->podofo()->GetDataType() == ePdfDataType_Name; 652 return ret->podofo()->GetDataType() == ePdfDataType_Name;
590 } 653 }
591 654
592 std::string getTransferFunctionAsName() const { 655 std::string getTransferFunctionAsName() const {
593 std::string ret = ""; 656 std::string ret = "";
594 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFun ction", "", &ret)) return ret; 657 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFun ction", "", &ret)) return ret;
595 // TODO(edisonn): warn about missing required field, assert for known good p dfs 658 // TODO(edisonn): warn about missing required field, assert for known good p dfs
596 return ""; 659 return "";
597 } 660 }
598 661
599 }; 662 };
600 663
601 #endif // __DEFINED__SkPdfType16HalftoneDictionary 664 #endif // __DEFINED__SkPdfType16HalftoneDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698