| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfAlternateImageDictionary | 1 #ifndef __DEFINED__SkPdfAlternateImageDictionary |
| 2 #define __DEFINED__SkPdfAlternateImageDictionary | 2 #define __DEFINED__SkPdfAlternateImageDictionary |
| 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 // Entries in an alternate image dictionary | 9 // Entries in an alternate image dictionary |
| 10 class SkPdfAlternateImageDictionary : public SkPdfDictionary { | 10 class SkPdfAlternateImageDictionary : public SkPdfDictionary { |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 virtual bool valid() const {return true;} | 524 virtual bool valid() const {return true;} |
| 525 | 525 |
| 526 SkPdfAlternateImageDictionary& operator=(const SkPdfAlternateImageDictionary&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} | 526 SkPdfAlternateImageDictionary& operator=(const SkPdfAlternateImageDictionary&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} |
| 527 | 527 |
| 528 /** (Required) The image XObject for the alternate image. | 528 /** (Required) The image XObject for the alternate image. |
| 529 **/ | 529 **/ |
| 530 bool has_Image() const { | 530 bool has_Image() const { |
| 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image
", "", NULL)); | 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image
", "", NULL)); |
| 532 } | 532 } |
| 533 | 533 |
| 534 SkPdfStream* Image() const { | 534 SkPdfStream* Image() const; |
| 535 SkPdfStream* ret; | |
| 536 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "
", &ret)) return ret; | |
| 537 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 538 return NULL; | |
| 539 } | |
| 540 | |
| 541 /** (Optional) A flag indicating whether this alternate image is the default ver
- | 535 /** (Optional) A flag indicating whether this alternate image is the default ver
- |
| 542 * sion to be used for printing. At most one alternate for a given base image m
ay | 536 * sion to be used for printing. At most one alternate for a given base image m
ay |
| 543 * be so designated. If no alternate has this entry set to true, the base image
itself | 537 * be so designated. If no alternate has this entry set to true, the base image
itself |
| 544 * is used for printing. | 538 * is used for printing. |
| 545 **/ | 539 **/ |
| 546 bool has_DefaultForPrinting() const { | 540 bool has_DefaultForPrinting() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Defau
ltForPrinting", "", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Defau
ltForPrinting", "", NULL)); |
| 548 } | 542 } |
| 549 | 543 |
| 550 bool DefaultForPrinting() const { | 544 bool DefaultForPrinting() const; |
| 551 bool ret; | |
| 552 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForP
rinting", "", &ret)) return ret; | |
| 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 554 return false; | |
| 555 } | |
| 556 | |
| 557 }; | 545 }; |
| 558 | 546 |
| 559 #endif // __DEFINED__SkPdfAlternateImageDictionary | 547 #endif // __DEFINED__SkPdfAlternateImageDictionary |
| OLD | NEW |