OLD | NEW |
1 #ifndef __DEFINED__SkPdfTrapNetworkAppearanceStreamDictionary | 1 #ifndef __DEFINED__SkPdfTrapNetworkAppearanceStreamDictionary |
2 #define __DEFINED__SkPdfTrapNetworkAppearanceStreamDictionary | 2 #define __DEFINED__SkPdfTrapNetworkAppearanceStreamDictionary |
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 trap network appearance stream |
8 class SkPdfTrapNetworkAppearanceStreamDictionary : public SkPdfDictionary { | 9 class SkPdfTrapNetworkAppearanceStreamDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kTrapNetworkAppearanceStreamD
ictionary_SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kTrapNetworkAppearanceStreamD
ictionary_SkPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrapNet
workAppearanceStreamDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTrapNet
workAppearanceStreamDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStr
eamDictionary() {return this;} | 14 virtual SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStr
eamDictionary() {return this;} |
14 virtual const SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppeara
nceStreamDictionary() const {return this;} | 15 virtual const SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppeara
nceStreamDictionary() 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 Loading... |
514 | 515 |
515 public: | 516 public: |
516 private: | 517 private: |
517 public: | 518 public: |
518 SkPdfTrapNetworkAppearanceStreamDictionary(const PdfMemDocument* podofoDoc = N
ULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj)
{} | 519 SkPdfTrapNetworkAppearanceStreamDictionary(const PdfMemDocument* podofoDoc = N
ULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj)
{} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfTrapNetworkAppearanceStreamDictionary& operator=(const SkPdfTrapNetworkAp
pearanceStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodo
foObj = from.fPodofoObj; return *this;} | 523 SkPdfTrapNetworkAppearanceStreamDictionary& operator=(const SkPdfTrapNetworkAp
pearanceStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodo
foObj = from.fPodofoObj; return *this;} |
523 | 524 |
| 525 /** (Required) The name of the process color model that was assumed |
| 526 * when this trap network was created; equivalent to the PostScript |
| 527 * page device parameter ProcessColorModel (see Section 6.2.5 of the |
| 528 * PostScript Language Reference, Third Edition). Valid values are |
| 529 * DeviceGray, DeviceRGB, DeviceCMYK, DeviceCMY, DeviceRGBK, |
| 530 * and DeviceN. |
| 531 **/ |
| 532 bool has_PCM() const { |
| 533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PCM",
"", NULL)); |
| 534 } |
| 535 |
524 std::string PCM() const { | 536 std::string PCM() const { |
525 std::string ret; | 537 std::string ret; |
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PCM", "", &
ret)) return ret; | 538 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PCM", "", &
ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 539 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return ""; | 540 return ""; |
529 } | 541 } |
530 | 542 |
| 543 /** (Optional) An array of names identifying the colorants that were |
| 544 * assumed when this network was created; equivalent to the Post- |
| 545 * Script page device parameter of the same name (see Section 6.2.5 of |
| 546 * the PostScript Language Reference, Third Edition). Colorants im- |
| 547 * plied by the process color model PCM are available automatically |
| 548 * and need not be explicitly declared. If this entry is absent, the |
| 549 * colorants implied by PCM are assumed. |
| 550 **/ |
| 551 bool has_SeparationColorNames() const { |
| 552 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Separ
ationColorNames", "", NULL)); |
| 553 } |
| 554 |
531 SkPdfArray SeparationColorNames() const { | 555 SkPdfArray SeparationColorNames() const { |
532 SkPdfArray ret; | 556 SkPdfArray ret; |
533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Separation
ColorNames", "", &ret)) return ret; | 557 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Separation
ColorNames", "", &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 558 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return SkPdfArray(); | 559 return SkPdfArray(); |
536 } | 560 } |
537 | 561 |
| 562 /** (Optional) An array of indirect references to TrapRegion objects |
| 563 * defining the page's trapping zones and the associated trapping |
| 564 * parameters, as described in Adobe Technical Note #5620, Portable |
| 565 * Job Ticket Format. These references are to objects comprising |
| 566 * portions of a PJTF job ticket that is embedded in the PDF file. |
| 567 * When the trapping zones and parameters are defined by an external |
| 568 * job ticket (or by some other means, such as with JDF), this entry is |
| 569 * absent. |
| 570 **/ |
| 571 bool has_TrapRegions() const { |
| 572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapR
egions", "", NULL)); |
| 573 } |
| 574 |
538 SkPdfArray TrapRegions() const { | 575 SkPdfArray TrapRegions() const { |
539 SkPdfArray ret; | 576 SkPdfArray ret; |
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapRegion
s", "", &ret)) return ret; | 577 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapRegion
s", "", &ret)) return ret; |
541 // 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 |
542 return SkPdfArray(); | 579 return SkPdfArray(); |
543 } | 580 } |
544 | 581 |
| 582 /** (Optional) A human-readable text string that applications can use |
| 583 * to describe this trap network to the user (for example, to allow |
| 584 * switching between trap networks). |
| 585 **/ |
| 586 bool has_TrapStyles() const { |
| 587 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapS
tyles", "", NULL)); |
| 588 } |
| 589 |
545 std::string TrapStyles() const { | 590 std::string TrapStyles() const { |
546 std::string ret; | 591 std::string ret; |
547 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapStyle
s", "", &ret)) return ret; | 592 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapStyle
s", "", &ret)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 593 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return ""; | 594 return ""; |
550 } | 595 } |
551 | 596 |
552 }; | 597 }; |
553 | 598 |
554 #endif // __DEFINED__SkPdfTrapNetworkAppearanceStreamDictionary | 599 #endif // __DEFINED__SkPdfTrapNetworkAppearanceStreamDictionary |
OLD | NEW |