OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #ifndef SkPDFCanvas_DEFINED | 7 #ifndef SkPDFCanvas_DEFINED |
8 #define SkPDFCanvas_DEFINED | 8 #define SkPDFCanvas_DEFINED |
9 | 9 |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 | 11 |
12 class SkPDFDevice; | 12 class SkPDFDevice; |
13 | 13 |
14 class SkPDFCanvas : public SkCanvas { | 14 class SkPDFCanvas : public SkCanvas { |
15 public: | 15 public: |
16 SkPDFCanvas(const sk_sp<SkPDFDevice>&); | 16 SkPDFCanvas(const sk_sp<SkPDFDevice>&); |
17 ~SkPDFCanvas(); | 17 ~SkPDFCanvas(); |
18 | 18 |
19 protected: | 19 protected: |
| 20 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 21 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 22 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; |
| 23 |
20 void onDrawBitmapNine(const SkBitmap&, const SkIRect&, const SkRect&, | 24 void onDrawBitmapNine(const SkBitmap&, const SkIRect&, const SkRect&, |
21 const SkPaint*) override; | 25 const SkPaint*) override; |
22 | 26 |
23 void onDrawImageNine(const SkImage*, const SkIRect&, const SkRect&, | 27 void onDrawImageNine(const SkImage*, const SkIRect&, const SkRect&, |
24 const SkPaint*) override; | 28 const SkPaint*) override; |
25 | 29 |
26 void onDrawImageRect(const SkImage*, | 30 void onDrawImageRect(const SkImage*, |
27 const SkRect*, | 31 const SkRect*, |
28 const SkRect&, | 32 const SkRect&, |
29 const SkPaint*, | 33 const SkPaint*, |
30 SkCanvas::SrcRectConstraint) override; | 34 SkCanvas::SrcRectConstraint) override; |
31 | 35 |
32 void onDrawBitmapRect(const SkBitmap&, | 36 void onDrawBitmapRect(const SkBitmap&, |
33 const SkRect*, | 37 const SkRect*, |
34 const SkRect&, | 38 const SkRect&, |
35 const SkPaint*, | 39 const SkPaint*, |
36 SkCanvas::SrcRectConstraint) override; | 40 SkCanvas::SrcRectConstraint) override; |
| 41 |
| 42 private: |
| 43 typedef SkCanvas INHERITED; |
37 }; | 44 }; |
38 | 45 |
39 #endif // SkPDFCanvas_DEFINED | 46 #endif // SkPDFCanvas_DEFINED |
OLD | NEW |