OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPDFDevice_DEFINED | 10 #ifndef SkPDFDevice_DEFINED |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 /** Returns a copy of the media box for this device. The caller is required | 155 /** Returns a copy of the media box for this device. The caller is required |
156 * to unref() this when it is finished. | 156 * to unref() this when it is finished. |
157 */ | 157 */ |
158 SK_API SkPDFArray* copyMediaBox() const; | 158 SK_API SkPDFArray* copyMediaBox() const; |
159 | 159 |
160 /** Get the annotations from this page, or NULL if there are none. | 160 /** Get the annotations from this page, or NULL if there are none. |
161 */ | 161 */ |
162 SK_API SkPDFArray* getAnnotations() const { return fAnnotations; } | 162 SK_API SkPDFArray* getAnnotations() const { return fAnnotations; } |
163 | 163 |
164 /** Returns a SkStream with the page contents. The caller is responsible | 164 /** Returns a SkStream with the page contents. The caller is responsible |
165 for a reference to the returned value. | 165 for a deleting the returned value. |
166 DEPRECATED: use copyContentToData() | |
167 */ | 166 */ |
168 SK_API SkStream* content() const; | 167 SK_API SkStreamAsset* content() const; |
169 | 168 |
170 /** Returns a SkStream with the page contents. The caller is responsible | 169 /** Writes the page contents to the stream. */ |
171 * for calling data->unref() when it is finished. | 170 SK_API void writeContent(SkWStream*) const; |
172 */ | |
173 SK_API SkData* copyContentToData() const; | |
174 | 171 |
175 SK_API const SkMatrix& initialTransform() const { | 172 SK_API const SkMatrix& initialTransform() const { |
176 return fInitialTransform; | 173 return fInitialTransform; |
177 } | 174 } |
178 | 175 |
179 /** Returns a SkPDFGlyphSetMap which represents glyph usage of every font | 176 /** Returns a SkPDFGlyphSetMap which represents glyph usage of every font |
180 * that shows on this device. | 177 * that shows on this device. |
181 */ | 178 */ |
182 const SkPDFGlyphSetMap& getFontGlyphUsage() const { | 179 const SkPDFGlyphSetMap& getFontGlyphUsage() const { |
183 return *(fFontGlyphUsage.get()); | 180 return *(fFontGlyphUsage.get()); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 309 |
313 typedef SkBaseDevice INHERITED; | 310 typedef SkBaseDevice INHERITED; |
314 | 311 |
315 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 312 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
316 // an SkPDFDevice | 313 // an SkPDFDevice |
317 //friend class SkDocument_PDF; | 314 //friend class SkDocument_PDF; |
318 //friend class SkPDFImageShader; | 315 //friend class SkPDFImageShader; |
319 }; | 316 }; |
320 | 317 |
321 #endif | 318 #endif |
OLD | NEW |