| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfType1PatternDictionary | 1 #ifndef __DEFINED__SkPdfType1PatternDictionary |
| 2 #define __DEFINED__SkPdfType1PatternDictionary | 2 #define __DEFINED__SkPdfType1PatternDictionary |
| 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 // Additional entries specific to a type 1 pattern dictionary | 9 // Additional entries specific to a type 1 pattern dictionary |
| 10 class SkPdfType1PatternDictionary : public SkPdfDictionary { | 10 class SkPdfType1PatternDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfType1PatternDictionary& operator=(const SkPdfType1PatternDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 526 SkPdfType1PatternDictionary& operator=(const SkPdfType1PatternDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
| 527 | 527 |
| 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, | 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, |
| 529 * must be Pattern for a pattern dictionary. | 529 * must be Pattern for a pattern dictionary. |
| 530 **/ | 530 **/ |
| 531 bool has_Type() const { | 531 bool has_Type() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Type() const { | 535 std::string Type() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) A code identifying the type of pattern that this dictionary de- | 536 /** (Required) A code identifying the type of pattern that this dictionary de- |
| 543 * scribes; must be 1 for a tiling pattern. | 537 * scribes; must be 1 for a tiling pattern. |
| 544 **/ | 538 **/ |
| 545 bool has_PatternType() const { | 539 bool has_PatternType() const { |
| 546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte
rnType", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Patte
rnType", "", NULL)); |
| 547 } | 541 } |
| 548 | 542 |
| 549 long PatternType() const { | 543 long PatternType() const; |
| 550 long ret; | |
| 551 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PatternType
", "", &ret)) return ret; | |
| 552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 553 return 0; | |
| 554 } | |
| 555 | |
| 556 /** (Required) A code that determines how the color of the pattern cell is to be | 544 /** (Required) A code that determines how the color of the pattern cell is to be |
| 557 * specified: | 545 * specified: |
| 558 * 1 Colored tiling pattern. The pattern's content stream itself specifi
es the | 546 * 1 Colored tiling pattern. The pattern's content stream itself specifi
es the |
| 559 * colors used to paint the pattern cell. When the content stream begi
ns | 547 * colors used to paint the pattern cell. When the content stream begi
ns |
| 560 * execution, the current color is the one that was initially in effec
t in the | 548 * execution, the current color is the one that was initially in effec
t in the |
| 561 * pattern's parent content stream. (This is similar to the definition
of the | 549 * pattern's parent content stream. (This is similar to the definition
of the |
| 562 * pattern matrix; see Section 4.6.1, "General Properties of Patterns.
") | 550 * pattern matrix; see Section 4.6.1, "General Properties of Patterns.
") |
| 563 * 2 Uncolored tiling pattern. The pattern's content stream does not spe
ci- | 551 * 2 Uncolored tiling pattern. The pattern's content stream does not spe
ci- |
| 564 * fy any color information. Instead, the entire pattern cell is paint
ed | 552 * fy any color information. Instead, the entire pattern cell is paint
ed |
| 565 * with a separately specified color each time the pattern is used. Es
sen- | 553 * with a separately specified color each time the pattern is used. Es
sen- |
| 566 * tially, the content stream describes a stencil through which the cu
r- | 554 * tially, the content stream describes a stencil through which the cu
r- |
| 567 **/ | 555 **/ |
| 568 bool has_PaintType() const { | 556 bool has_PaintType() const { |
| 569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paint
Type", "", NULL)); | 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paint
Type", "", NULL)); |
| 570 } | 558 } |
| 571 | 559 |
| 572 long PaintType() const { | 560 long PaintType() const; |
| 573 long ret; | |
| 574 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PaintType",
"", &ret)) return ret; | |
| 575 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 576 return 0; | |
| 577 } | |
| 578 | |
| 579 }; | 561 }; |
| 580 | 562 |
| 581 #endif // __DEFINED__SkPdfType1PatternDictionary | 563 #endif // __DEFINED__SkPdfType1PatternDictionary |
| OLD | NEW |