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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 119 void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
120 const SkPaint&) override; | 120 const SkPaint&) override; |
121 | 121 |
122 SkImageInfo imageInfo() const override; | 122 SkImageInfo imageInfo() const override; |
123 | 123 |
124 // PDF specific methods. | 124 // PDF specific methods. |
125 | 125 |
126 /** Create the resource dictionary for this device. */ | 126 /** Create the resource dictionary for this device. */ |
127 sk_sp<SkPDFDict> makeResourceDict() const; | 127 sk_sp<SkPDFDict> makeResourceDict() const; |
128 | 128 |
129 /** Get the fonts used on this device. | |
130 */ | |
131 const SkTDArray<SkPDFFont*>& getFontResources() const; | |
132 | |
133 /** Add our annotations (link to urls and destinations) to the supplied | 129 /** Add our annotations (link to urls and destinations) to the supplied |
134 * array. | 130 * array. |
135 * @param array Array to add annotations to. | 131 * @param array Array to add annotations to. |
136 */ | 132 */ |
137 void appendAnnotations(SkPDFArray* array) const; | 133 void appendAnnotations(SkPDFArray* array) const; |
138 | 134 |
139 /** Add our named destinations to the supplied dictionary. | 135 /** Add our named destinations to the supplied dictionary. |
140 * @param dict Dictionary to add destinations to. | 136 * @param dict Dictionary to add destinations to. |
141 * @param page The PDF object representing the page for this device. | 137 * @param page The PDF object representing the page for this device. |
142 */ | 138 */ |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 312 |
317 typedef SkBaseDevice INHERITED; | 313 typedef SkBaseDevice INHERITED; |
318 | 314 |
319 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 315 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
320 // an SkPDFDevice | 316 // an SkPDFDevice |
321 //friend class SkDocument_PDF; | 317 //friend class SkDocument_PDF; |
322 //friend class SkPDFImageShader; | 318 //friend class SkPDFImageShader; |
323 }; | 319 }; |
324 | 320 |
325 #endif | 321 #endif |
OLD | NEW |