OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 7 |
8 #ifndef SkPDFDevice_DEFINED | 8 #ifndef SkPDFDevice_DEFINED |
9 #define SkPDFDevice_DEFINED | 9 #define SkPDFDevice_DEFINED |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 * @param dict Dictionary to add destinations to. | 161 * @param dict Dictionary to add destinations to. |
162 * @param page The PDF object representing the page for this device. | 162 * @param page The PDF object representing the page for this device. |
163 */ | 163 */ |
164 void appendDestinations(SkPDFDict* dict, SkPDFObject* page) const; | 164 void appendDestinations(SkPDFDict* dict, SkPDFObject* page) const; |
165 | 165 |
166 /** Returns a copy of the media box for this device. */ | 166 /** Returns a copy of the media box for this device. */ |
167 sk_sp<SkPDFArray> copyMediaBox() const; | 167 sk_sp<SkPDFArray> copyMediaBox() const; |
168 | 168 |
169 /** Returns a SkStream with the page contents. | 169 /** Returns a SkStream with the page contents. |
170 */ | 170 */ |
171 skstd::unique_ptr<SkStreamAsset> content() const; | 171 std::unique_ptr<SkStreamAsset> content() const; |
172 | 172 |
173 /** Writes the page contents to the stream. */ | 173 /** Writes the page contents to the stream. */ |
174 void writeContent(SkWStream*) const; | 174 void writeContent(SkWStream*) const; |
175 | 175 |
176 const SkMatrix& initialTransform() const { | 176 const SkMatrix& initialTransform() const { |
177 return fInitialTransform; | 177 return fInitialTransform; |
178 } | 178 } |
179 | 179 |
180 /** Returns a SkPDFGlyphSetMap which represents glyph usage of every font | 180 /** Returns a SkPDFGlyphSetMap which represents glyph usage of every font |
181 * that shows on this device. | 181 * that shows on this device. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 typedef SkBaseDevice INHERITED; | 334 typedef SkBaseDevice INHERITED; |
335 | 335 |
336 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 336 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
337 // an SkPDFDevice | 337 // an SkPDFDevice |
338 //friend class SkDocument_PDF; | 338 //friend class SkDocument_PDF; |
339 //friend class SkPDFImageShader; | 339 //friend class SkPDFImageShader; |
340 }; | 340 }; |
341 | 341 |
342 #endif | 342 #endif |
OLD | NEW |