| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 const SkScalar pos[], int scalarsPerPos, | 112 const SkScalar pos[], int scalarsPerPos, |
| 113 const SkPoint& offset, const SkPaint&) override; | 113 const SkPoint& offset, const SkPaint&) override; |
| 114 void drawVertices(const SkDraw&, SkCanvas::VertexMode, | 114 void drawVertices(const SkDraw&, SkCanvas::VertexMode, |
| 115 int vertexCount, const SkPoint verts[], | 115 int vertexCount, const SkPoint verts[], |
| 116 const SkPoint texs[], const SkColor colors[], | 116 const SkPoint texs[], const SkColor colors[], |
| 117 SkXfermode* xmode, const uint16_t indices[], | 117 SkXfermode* xmode, const uint16_t indices[], |
| 118 int indexCount, const SkPaint& paint) override; | 118 int indexCount, const SkPaint& paint) override; |
| 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; | |
| 123 | |
| 124 // PDF specific methods. | 122 // PDF specific methods. |
| 125 | 123 |
| 126 /** Create the resource dictionary for this device. */ | 124 /** Create the resource dictionary for this device. */ |
| 127 sk_sp<SkPDFDict> makeResourceDict() const; | 125 sk_sp<SkPDFDict> makeResourceDict() const; |
| 128 | 126 |
| 129 /** Add our annotations (link to urls and destinations) to the supplied | 127 /** Add our annotations (link to urls and destinations) to the supplied |
| 130 * array. | 128 * array. |
| 131 * @param array Array to add annotations to. | 129 * @param array Array to add annotations to. |
| 132 */ | 130 */ |
| 133 void appendAnnotations(SkPDFArray* array) const; | 131 void appendAnnotations(SkPDFArray* array) const; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 310 |
| 313 typedef SkBaseDevice INHERITED; | 311 typedef SkBaseDevice INHERITED; |
| 314 | 312 |
| 315 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 313 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
| 316 // an SkPDFDevice | 314 // an SkPDFDevice |
| 317 //friend class SkDocument_PDF; | 315 //friend class SkDocument_PDF; |
| 318 //friend class SkPDFImageShader; | 316 //friend class SkPDFImageShader; |
| 319 }; | 317 }; |
| 320 | 318 |
| 321 #endif | 319 #endif |
| OLD | NEW |