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

Side by Side Diff: experimental/PdfViewer/SkPdfType6HalftoneDictionary_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__SkPdfType6HalftoneDictionary 1 #ifndef __DEFINED__SkPdfType6HalftoneDictionary
2 #define __DEFINED__SkPdfType6HalftoneDictionary 2 #define __DEFINED__SkPdfType6HalftoneDictionary
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 6 halftone dictionary
8 class SkPdfType6HalftoneDictionary : public SkPdfDictionary { 9 class SkPdfType6HalftoneDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kType6HalftoneDictionary_SkPd fObjectType;} 11 virtual SkPdfObjectType getType() const { return kType6HalftoneDictionary_SkPd fObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType6Ha lftoneDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kType6Ha lftoneDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() {return this ;} 14 virtual SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() {return this ;}
14 virtual const SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() const {return this;} 15 virtual const SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() const {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 SkPdfType6HalftoneDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfType6HalftoneDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfType6HalftoneDictionary& operator=(const SkPdfType6HalftoneDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;} 523 SkPdfType6HalftoneDictionary& operator=(const SkPdfType6HalftoneDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *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 6 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 threshold array, in device pixels.
567 **/
568 bool has_Width() const {
569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width ", "", NULL));
570 }
571
545 long Width() const { 572 long Width() const {
546 long ret; 573 long ret;
547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret; 574 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 575 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return 0; 576 return 0;
550 } 577 }
551 578
579 /** (Required) The height of the threshold array, in device pixels.
580 **/
581 bool has_Height() const {
582 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Heigh t", "", NULL));
583 }
584
552 long Height() const { 585 long Height() const {
553 long ret; 586 long ret;
554 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "" , &ret)) return ret; 587 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "" , &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 588 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return 0; 589 return 0;
557 } 590 }
558 591
592 /** (Optional) A transfer function, which overrides the current transfer
593 * function in the graphics state for the same component. This entry is
594 * required if the dictionary is a component of a type 5 halftone (see
595 * "Type 5 Halftones" on page 400) and represents either a nonprimary
596 * or nonstandard primary color component (see Section 6.3, "Transfer
597 * Functions"). The name Identity may be used to specify the identity
598 * function.
599 **/
600 bool has_TransferFunction() const {
601 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trans ferFunction", "", NULL));
602 }
603
559 bool isTransferFunctionAFunction() const { 604 bool isTransferFunctionAFunction() const {
560 SkPdfObject* ret = NULL; 605 SkPdfObject* ret = NULL;
561 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false; 606 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false;
562 return ret->podofo()->GetDataType() == ePdfDataType_Reference; 607 return ret->podofo()->GetDataType() == ePdfDataType_Reference;
563 } 608 }
564 609
565 SkPdfFunction getTransferFunctionAsFunction() const { 610 SkPdfFunction getTransferFunctionAsFunction() const {
566 SkPdfFunction ret = SkPdfFunction(); 611 SkPdfFunction ret = SkPdfFunction();
567 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfe rFunction", "", &ret)) return ret; 612 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfe rFunction", "", &ret)) return ret;
568 // TODO(edisonn): warn about missing required field, assert for known good p dfs 613 // TODO(edisonn): warn about missing required field, assert for known good p dfs
569 return SkPdfFunction(); 614 return SkPdfFunction();
570 } 615 }
571 616
572 bool isTransferFunctionAName() const { 617 bool isTransferFunctionAName() const {
573 SkPdfObject* ret = NULL; 618 SkPdfObject* ret = NULL;
574 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false; 619 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Transfer Function", "", &ret)) return false;
575 return ret->podofo()->GetDataType() == ePdfDataType_Name; 620 return ret->podofo()->GetDataType() == ePdfDataType_Name;
576 } 621 }
577 622
578 std::string getTransferFunctionAsName() const { 623 std::string getTransferFunctionAsName() const {
579 std::string ret = ""; 624 std::string ret = "";
580 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFun ction", "", &ret)) return ret; 625 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFun ction", "", &ret)) return ret;
581 // TODO(edisonn): warn about missing required field, assert for known good p dfs 626 // TODO(edisonn): warn about missing required field, assert for known good p dfs
582 return ""; 627 return "";
583 } 628 }
584 629
585 }; 630 };
586 631
587 #endif // __DEFINED__SkPdfType6HalftoneDictionary 632 #endif // __DEFINED__SkPdfType6HalftoneDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698