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 #ifndef SkNWayCanvas_DEFINED | 9 #ifndef SkNWayCanvas_DEFINED |
10 #define SkNWayCanvas_DEFINED | 10 #define SkNWayCanvas_DEFINED |
11 | 11 |
12 #include "SkCanvas.h" | 12 #include "SkCanvas.h" |
13 | 13 |
14 class SK_API SkNWayCanvas : public SkCanvas { | 14 class SK_API SkNWayCanvas : public SkCanvas { |
15 public: | 15 public: |
16 SkNWayCanvas(int width, int height); | 16 SkNWayCanvas(int width, int height); |
17 virtual ~SkNWayCanvas(); | 17 virtual ~SkNWayCanvas(); |
18 | 18 |
19 virtual void addCanvas(SkCanvas*); | 19 virtual void addCanvas(SkCanvas*); |
20 virtual void removeCanvas(SkCanvas*); | 20 virtual void removeCanvas(SkCanvas*); |
21 virtual void removeAll(); | 21 virtual void removeAll(); |
22 | 22 |
23 /////////////////////////////////////////////////////////////////////////// | 23 /////////////////////////////////////////////////////////////////////////// |
24 // These are forwarded to the N canvases we're referencing | 24 // These are forwarded to the N canvases we're referencing |
25 | 25 |
26 SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; | 26 SkDrawFilter* setDrawFilter(SkDrawFilter*) override; |
27 | 27 |
28 void beginCommentGroup(const char* description) SK_OVERRIDE; | 28 void beginCommentGroup(const char* description) override; |
29 void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 29 void addComment(const char* kywd, const char* value) override; |
30 void endCommentGroup() SK_OVERRIDE; | 30 void endCommentGroup() override; |
31 | 31 |
32 protected: | 32 protected: |
33 SkTDArray<SkCanvas*> fList; | 33 SkTDArray<SkCanvas*> fList; |
34 | 34 |
35 void willSave() SK_OVERRIDE; | 35 void willSave() override; |
36 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK
_OVERRIDE; | 36 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) ov
erride; |
37 void willRestore() SK_OVERRIDE; | 37 void willRestore() override; |
38 | 38 |
39 void didConcat(const SkMatrix&) SK_OVERRIDE; | 39 void didConcat(const SkMatrix&) override; |
40 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 40 void didSetMatrix(const SkMatrix&) override; |
41 | 41 |
42 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; | 42 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; |
43 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | 43 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, |
44 const SkPaint&) SK_OVERRIDE; | 44 const SkPaint&) override; |
45 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | 45 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], |
46 const SkPaint&) SK_OVERRIDE; | 46 const SkPaint&) override; |
47 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 47 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
48 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 48 SkScalar constY, const SkPaint&) override; |
49 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 49 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
50 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 50 const SkMatrix* matrix, const SkPaint&) overri
de; |
51 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 51 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
52 const SkPaint& paint) SK_OVERRIDE; | 52 const SkPaint& paint) override; |
53 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 53 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
54 const SkPoint texCoords[4], SkXfermode* xmode, | 54 const SkPoint texCoords[4], SkXfermode* xmode, |
55 const SkPaint& paint) SK_OVERRIDE; | 55 const SkPaint& paint) override; |
56 | 56 |
57 void onDrawPaint(const SkPaint&) SK_OVERRIDE; | 57 void onDrawPaint(const SkPaint&) override; |
58 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain
t&) SK_OVERRIDE; | 58 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain
t&) override; |
59 void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; | 59 void onDrawRect(const SkRect&, const SkPaint&) override; |
60 void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; | 60 void onDrawOval(const SkRect&, const SkPaint&) override; |
61 void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; | 61 void onDrawRRect(const SkRRect&, const SkPaint&) override; |
62 void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; | 62 void onDrawPath(const SkPath&, const SkPaint&) override; |
63 void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPain
t*) SK_OVERRIDE; | 63 void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPain
t*) override; |
64 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
const SkPaint*, | 64 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
const SkPaint*, |
65 DrawBitmapRectFlags flags) SK_OVERRIDE; | 65 DrawBitmapRectFlags flags) override; |
66 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*
) SK_OVERRIDE; | 66 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*
) override; |
67 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, | 67 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, |
68 const SkPaint*) SK_OVERRIDE; | 68 const SkPaint*) override; |
69 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, | 69 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, |
70 const SkPaint*) SK_OVERRIDE; | 70 const SkPaint*) override; |
71 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; | 71 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) overri
de; |
72 void onDrawVertices(VertexMode vmode, int vertexCount, | 72 void onDrawVertices(VertexMode vmode, int vertexCount, |
73 const SkPoint vertices[], const SkPoint texs[], | 73 const SkPoint vertices[], const SkPoint texs[], |
74 const SkColor colors[], SkXfermode* xmode, | 74 const SkColor colors[], SkXfermode* xmode, |
75 const uint16_t indices[], int indexCount, | 75 const uint16_t indices[], int indexCount, |
76 const SkPaint&) SK_OVERRIDE; | 76 const SkPaint&) override; |
77 | 77 |
78 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; | 78 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; |
79 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; | 79 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; |
80 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; | 80 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; |
81 void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 81 void onClipRegion(const SkRegion&, SkRegion::Op) override; |
82 | 82 |
83 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVE
RRIDE; | 83 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; |
84 | 84 |
85 class Iter; | 85 class Iter; |
86 | 86 |
87 private: | 87 private: |
88 typedef SkCanvas INHERITED; | 88 typedef SkCanvas INHERITED; |
89 }; | 89 }; |
90 | 90 |
91 | 91 |
92 #endif | 92 #endif |
OLD | NEW |