| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfCIDFontDictionary | 1 #ifndef __DEFINED__SkPdfCIDFontDictionary |
| 2 #define __DEFINED__SkPdfCIDFontDictionary | 2 #define __DEFINED__SkPdfCIDFontDictionary |
| 3 | 3 |
| 4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
| 5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
| 6 #include "SkPdfFontDictionary_autogen.h" | 6 #include "SkPdfFontDictionary_autogen.h" |
| 7 | 7 |
| 8 // Entries in a CIDFont dictionary | 8 // Entries in a CIDFont dictionary |
| 9 class SkPdfCIDFontDictionary : public SkPdfFontDictionary { | 9 class SkPdfCIDFontDictionary : public SkPdfFontDictionary { |
| 10 public: | 10 public: |
| 11 virtual SkPdfObjectType getType() const { return kCIDFontDictionary_SkPdfObjec
tType;} | 11 virtual SkPdfObjectType getType() const { return kCIDFontDictionary_SkPdfObjec
tType;} |
| 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCIDFont
Dictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kCIDFont
Dictionary_SkPdfObjectType + 1);} |
| 13 public: | 13 public: |
| 14 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return this;} | 14 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return this;} |
| 15 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return this
;} | 15 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return this
;} |
| 16 | 16 |
| 17 private: | 17 private: |
| 18 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} | |
| 19 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} | |
| 20 | |
| 21 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} | 18 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;} |
| 22 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} | 19 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return
NULL;} |
| 23 | 20 |
| 21 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} |
| 22 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} |
| 23 |
| 24 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} | 24 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;} |
| 25 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} | 25 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return
NULL;} |
| 26 | 26 |
| 27 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} | 27 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return
NULL;} |
| 28 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} | 28 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co
nst {return NULL;} |
| 29 | 29 |
| 30 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;} | 30 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;} |
| 31 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return
NULL;} | 31 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r
eturn NULL;} |
| 32 | 32 |
| 33 public: | 33 public: |
| 34 private: | 34 private: |
| 35 public: | 35 public: |
| 36 SkPdfCIDFontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject
* podofoObj = NULL) : SkPdfFontDictionary(podofoDoc, podofoObj) {} | 36 SkPdfCIDFontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject
* podofoObj = NULL) : SkPdfFontDictionary(podofoDoc, podofoObj) {} |
| 37 | 37 |
| 38 virtual bool valid() const {return true;} | 38 virtual bool valid() const {return true;} |
| 39 | 39 |
| 40 SkPdfCIDFontDictionary& operator=(const SkPdfCIDFontDictionary& from) {this->f
PodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} | 40 SkPdfCIDFontDictionary& operator=(const SkPdfCIDFontDictionary& from) {this->f
PodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} |
| 41 | 41 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 bool has_CIDToGIDMap() const { | 187 bool has_CIDToGIDMap() const { |
| 188 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDTo
GIDMap", "", NULL)); | 188 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDTo
GIDMap", "", NULL)); |
| 189 } | 189 } |
| 190 | 190 |
| 191 bool isCIDToGIDMapAStream() const { | 191 bool isCIDToGIDMapAStream() const { |
| 192 SkPdfObject* ret = NULL; | 192 SkPdfObject* ret = NULL; |
| 193 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGID
Map", "", &ret)) return false; | 193 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGID
Map", "", &ret)) return false; |
| 194 return ret->podofo()->HasStream(); | 194 return ret->podofo()->HasStream(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 SkPdfStream getCIDToGIDMapAsStream() const { | 197 SkPdfStream* getCIDToGIDMapAsStream() const { |
| 198 SkPdfStream ret = SkPdfStream(); | 198 SkPdfStream* ret = NULL; |
| 199 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDM
ap", "", &ret)) return ret; | 199 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDM
ap", "", &ret)) return ret; |
| 200 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 200 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 201 return SkPdfStream(); | 201 return NULL; |
| 202 } | 202 } |
| 203 | 203 |
| 204 bool isCIDToGIDMapAName() const { | 204 bool isCIDToGIDMapAName() const { |
| 205 SkPdfObject* ret = NULL; | 205 SkPdfObject* ret = NULL; |
| 206 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGID
Map", "", &ret)) return false; | 206 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGID
Map", "", &ret)) return false; |
| 207 return ret->podofo()->GetDataType() == ePdfDataType_Name; | 207 return ret->podofo()->GetDataType() == ePdfDataType_Name; |
| 208 } | 208 } |
| 209 | 209 |
| 210 std::string getCIDToGIDMapAsName() const { | 210 std::string getCIDToGIDMapAsName() const { |
| 211 std::string ret = ""; | 211 std::string ret = ""; |
| 212 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap
", "", &ret)) return ret; | 212 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap
", "", &ret)) return ret; |
| 213 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 213 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 214 return ""; | 214 return ""; |
| 215 } | 215 } |
| 216 | 216 |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 #endif // __DEFINED__SkPdfCIDFontDictionary | 219 #endif // __DEFINED__SkPdfCIDFontDictionary |
| OLD | NEW |