| 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 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; |
| 27 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], |
| 28 const SkPaint&) SK_OVERRIDE; |
| 29 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; |
| 30 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; |
| 31 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; |
| 32 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE; |
| 33 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, |
| 34 const SkPaint*) SK_OVERRIDE; |
| 35 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, |
| 36 const SkRect& dst, const SkPaint* paint, |
| 37 DrawBitmapRectFlags flags) SK_OVERRIDE; |
| 38 virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top, |
| 39 const SkPaint* paint) SK_OVERRIDE; |
| 40 virtual void drawImageRect(const SkImage* image, const SkRect* src, |
| 41 const SkRect& dst, |
| 42 const SkPaint* paint) SK_OVERRIDE; |
| 43 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, |
| 44 const SkRect& dst, |
| 45 const SkPaint* paint = NULL) SK_OVERRIDE; |
| 46 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, |
| 47 const SkPaint*) SK_OVERRIDE; |
| 48 virtual void drawVertices(VertexMode vmode, int vertexCount, |
| 49 const SkPoint vertices[], const SkPoint texs[], |
| 50 const SkColor colors[], SkXfermode* xmode, |
| 51 const uint16_t indices[], int indexCount, |
| 52 const SkPaint&) SK_OVERRIDE; |
| 53 |
| 26 virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; | 54 virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; |
| 27 | 55 |
| 28 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 56 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; |
| 29 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 57 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
| 30 virtual void endCommentGroup() SK_OVERRIDE; | 58 virtual void endCommentGroup() SK_OVERRIDE; |
| 31 | 59 |
| 32 protected: | 60 protected: |
| 33 SkTDArray<SkCanvas*> fList; | 61 SkTDArray<SkCanvas*> fList; |
| 34 | 62 |
| 35 virtual void willSave() SK_OVERRIDE; | 63 virtual void willSave() SK_OVERRIDE; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 75 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
| 48 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 76 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
| 49 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 77 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
| 50 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 78 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
| 51 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 79 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 52 const SkPaint& paint) SK_OVERRIDE; | 80 const SkPaint& paint) SK_OVERRIDE; |
| 53 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 81 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
| 54 const SkPoint texCoords[4], SkXfermode* xmode, | 82 const SkPoint texCoords[4], SkXfermode* xmode, |
| 55 const SkPaint& paint) SK_OVERRIDE; | 83 const SkPaint& paint) SK_OVERRIDE; |
| 56 | 84 |
| 57 void onDrawPaint(const SkPaint&) SK_OVERRIDE; | |
| 58 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain
t&) SK_OVERRIDE; | |
| 59 void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; | |
| 60 void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; | |
| 61 void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; | |
| 62 void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; | |
| 63 void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPain
t*) SK_OVERRIDE; | |
| 64 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
const SkPaint*, | |
| 65 DrawBitmapRectFlags flags) SK_OVERRIDE; | |
| 66 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*
) SK_OVERRIDE; | |
| 67 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, | |
| 68 const SkPaint*) SK_OVERRIDE; | |
| 69 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, | |
| 70 const SkPaint*) SK_OVERRIDE; | |
| 71 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; | |
| 72 void onDrawVertices(VertexMode vmode, int vertexCount, | |
| 73 const SkPoint vertices[], const SkPoint texs[], | |
| 74 const SkColor colors[], SkXfermode* xmode, | |
| 75 const uint16_t indices[], int indexCount, | |
| 76 const SkPaint&) SK_OVERRIDE; | |
| 77 | |
| 78 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 85 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 79 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 86 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 80 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 87 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 81 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 88 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
| 82 | 89 |
| 83 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 90 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; |
| 84 | 91 |
| 85 class Iter; | 92 class Iter; |
| 86 | 93 |
| 87 private: | 94 private: |
| 88 typedef SkCanvas INHERITED; | 95 typedef SkCanvas INHERITED; |
| 89 }; | 96 }; |
| 90 | 97 |
| 91 | 98 |
| 92 #endif | 99 #endif |
| OLD | NEW |