OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkLuaCanvas_DEFINED | 8 #ifndef SkLuaCanvas_DEFINED |
9 #define SkLuaCanvas_DEFINED | 9 #define SkLuaCanvas_DEFINED |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; | 29 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; |
30 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, | 30 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, |
31 const SkPaint* paint) SK_OVERRIDE; | 31 const SkPaint* paint) SK_OVERRIDE; |
32 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, | 32 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, |
33 const SkRect& dst, const SkPaint* paint, | 33 const SkRect& dst, const SkPaint* paint, |
34 DrawBitmapRectFlags flags) SK_OVERRIDE; | 34 DrawBitmapRectFlags flags) SK_OVERRIDE; |
35 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, | 35 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, |
36 const SkPaint* paint) SK_OVERRIDE; | 36 const SkPaint* paint) SK_OVERRIDE; |
37 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, | 37 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, |
38 const SkPaint* paint) SK_OVERRIDE; | 38 const SkPaint* paint) SK_OVERRIDE; |
| 39 virtual void drawText(const void* text, size_t byteLength, SkScalar x, |
| 40 SkScalar y, const SkPaint& paint) SK_OVERRIDE; |
| 41 virtual void drawPosText(const void* text, size_t byteLength, |
| 42 const SkPoint pos[], const SkPaint& paint) SK_OVERR
IDE; |
| 43 virtual void drawPosTextH(const void* text, size_t byteLength, |
| 44 const SkScalar xpos[], SkScalar constY, |
| 45 const SkPaint& paint) SK_OVERRIDE; |
| 46 virtual void drawTextOnPath(const void* text, size_t byteLength, |
| 47 const SkPath& path, const SkMatrix* matrix, |
| 48 const SkPaint& paint) SK_OVERRIDE; |
39 virtual void drawPicture(SkPicture&) SK_OVERRIDE; | 49 virtual void drawPicture(SkPicture&) SK_OVERRIDE; |
40 virtual void drawVertices(VertexMode vmode, int vertexCount, | 50 virtual void drawVertices(VertexMode vmode, int vertexCount, |
41 const SkPoint vertices[], const SkPoint texs[], | 51 const SkPoint vertices[], const SkPoint texs[], |
42 const SkColor colors[], SkXfermode* xmode, | 52 const SkColor colors[], SkXfermode* xmode, |
43 const uint16_t indices[], int indexCount, | 53 const uint16_t indices[], int indexCount, |
44 const SkPaint& paint) SK_OVERRIDE; | 54 const SkPaint& paint) SK_OVERRIDE; |
45 virtual void drawData(const void* data, size_t length) SK_OVERRIDE; | 55 virtual void drawData(const void* data, size_t length) SK_OVERRIDE; |
46 | 56 |
47 protected: | 57 protected: |
48 virtual void willSave(SaveFlags) SK_OVERRIDE; | 58 virtual void willSave(SaveFlags) SK_OVERRIDE; |
49 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 59 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
50 virtual void willRestore() SK_OVERRIDE; | 60 virtual void willRestore() SK_OVERRIDE; |
51 | 61 |
52 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; | 62 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; |
53 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 63 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
54 | 64 |
55 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 65 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
56 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | |
57 const SkPaint&) SK_OVERRIDE; | |
58 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | |
59 const SkPaint&) SK_OVERRIDE; | |
60 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | |
61 SkScalar constY, const SkPaint&) SK_OVERRIDE; | |
62 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | |
63 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | |
64 | 66 |
65 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 67 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
66 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 68 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
67 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 69 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
68 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 70 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
69 | 71 |
70 private: | 72 private: |
71 lua_State* fL; | 73 lua_State* fL; |
72 SkString fFunc; | 74 SkString fFunc; |
73 | 75 |
74 void sendverb(const char verb[]); | 76 void sendverb(const char verb[]); |
75 | 77 |
76 typedef SkCanvas INHERITED; | 78 typedef SkCanvas INHERITED; |
77 }; | 79 }; |
78 | 80 |
79 #endif | 81 #endif |
OLD | NEW |