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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 * (used by layer restore) draws the device after this initial | 63 * (used by layer restore) draws the device after this initial |
64 * transform is applied, so the PDF device does an | 64 * transform is applied, so the PDF device does an |
65 * inverse scale+translate to accommodate the one that SkPDFDevice | 65 * inverse scale+translate to accommodate the one that SkPDFDevice |
66 * always does. | 66 * always does. |
67 */ | 67 */ |
68 // Deprecated, please use SkDocument::CreatePdf() instead. | 68 // Deprecated, please use SkDocument::CreatePdf() instead. |
69 SK_API SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize, | 69 SK_API SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize, |
70 const SkMatrix& initialTransform); | 70 const SkMatrix& initialTransform); |
71 SK_API virtual ~SkPDFDevice(); | 71 SK_API virtual ~SkPDFDevice(); |
72 | 72 |
73 virtual void clear(SkColor color) SK_OVERRIDE; | |
74 | |
75 /** These are called inside the per-device-layer loop for each draw call. | 73 /** These are called inside the per-device-layer loop for each draw call. |
76 When these are called, we have already applied any saveLayer operations, | 74 When these are called, we have already applied any saveLayer operations, |
77 and are handling any looping from the paint, and any effects from the | 75 and are handling any looping from the paint, and any effects from the |
78 DrawFilter. | 76 DrawFilter. |
79 */ | 77 */ |
80 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; | 78 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; |
81 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, | 79 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, |
82 size_t count, const SkPoint[], | 80 size_t count, const SkPoint[], |
83 const SkPaint& paint) SK_OVERRIDE; | 81 const SkPaint& paint) SK_OVERRIDE; |
84 virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint); | 82 virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 | 330 |
333 typedef SkBaseDevice INHERITED; | 331 typedef SkBaseDevice INHERITED; |
334 | 332 |
335 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 333 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
336 // an SkPDFDevice | 334 // an SkPDFDevice |
337 //friend class SkDocument_PDF; | 335 //friend class SkDocument_PDF; |
338 //friend class SkPDFImageShader; | 336 //friend class SkPDFImageShader; |
339 }; | 337 }; |
340 | 338 |
341 #endif | 339 #endif |
OLD | NEW |