OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef SkPDFDocument_DEFINED | 7 #ifndef SkPDFDocument_DEFINED |
8 #define SkPDFDocument_DEFINED | 8 #define SkPDFDocument_DEFINED |
9 | 9 |
10 #include "SkDocument.h" | 10 #include "SkDocument.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 to the SkPDFObjNumMap without serializing them, they will be | 68 to the SkPDFObjNumMap without serializing them, they will be |
69 serialized as well. | 69 serialized as well. |
70 | 70 |
71 It might go without saying that objects should not be changed | 71 It might go without saying that objects should not be changed |
72 after calling serialize, since those changes will be too late. | 72 after calling serialize, since those changes will be too late. |
73 The same goes for changes to the SkPDFSubstituteMap that effect | 73 The same goes for changes to the SkPDFSubstituteMap that effect |
74 the object or its dependencies. | 74 the object or its dependencies. |
75 */ | 75 */ |
76 void serialize(const sk_sp<SkPDFObject>&); | 76 void serialize(const sk_sp<SkPDFObject>&); |
77 SkPDFCanon* canon() { return &fCanon; } | 77 SkPDFCanon* canon() { return &fCanon; } |
| 78 SkPDFGlyphSetMap* getGlyphUsage() { return &fGlyphUsage; } |
78 | 79 |
79 private: | 80 private: |
80 SkPDFObjectSerializer fObjectSerializer; | 81 SkPDFObjectSerializer fObjectSerializer; |
81 SkPDFCanon fCanon; | 82 SkPDFCanon fCanon; |
82 SkPDFGlyphSetMap fGlyphUsage; | 83 SkPDFGlyphSetMap fGlyphUsage; |
83 SkTArray<sk_sp<SkPDFDict>> fPages; | 84 SkTArray<sk_sp<SkPDFDict>> fPages; |
84 sk_sp<SkPDFDict> fDests; | 85 sk_sp<SkPDFDict> fDests; |
85 sk_sp<SkPDFDevice> fPageDevice; | 86 sk_sp<SkPDFDevice> fPageDevice; |
86 sk_sp<SkCanvas> fCanvas; | 87 sk_sp<SkCanvas> fCanvas; |
87 sk_sp<SkPDFObject> fID; | 88 sk_sp<SkPDFObject> fID; |
88 sk_sp<SkPDFObject> fXMP; | 89 sk_sp<SkPDFObject> fXMP; |
89 SkScalar fRasterDpi; | 90 SkScalar fRasterDpi; |
90 SkDocument::PDFMetadata fMetadata; | 91 SkDocument::PDFMetadata fMetadata; |
91 bool fPDFA; | 92 bool fPDFA; |
92 }; | 93 }; |
93 | 94 |
94 #endif // SkPDFDocument_DEFINED | 95 #endif // SkPDFDocument_DEFINED |
OLD | NEW |