| 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 SkLua_DEFINED | 8 #ifndef SkLua_DEFINED |
| 9 #define SkLua_DEFINED | 9 #define SkLua_DEFINED |
| 10 | 10 |
| 11 #include "SkColor.h" | 11 #include "SkColor.h" |
| 12 #include "SkScalar.h" | 12 #include "SkScalar.h" |
| 13 #include "SkString.h" | 13 #include "SkString.h" |
| 14 | 14 |
| 15 struct lua_State; | 15 struct lua_State; |
| 16 | 16 |
| 17 class SkCanvas; | 17 class SkCanvas; |
| 18 class SkClipStack; |
| 18 class SkMatrix; | 19 class SkMatrix; |
| 19 class SkPaint; | 20 class SkPaint; |
| 20 class SkPath; | 21 class SkPath; |
| 21 struct SkRect; | 22 struct SkRect; |
| 22 class SkRRect; | 23 class SkRRect; |
| 23 | 24 |
| 24 #define SkScalarToLua(x) SkScalarToDouble(x) | 25 #define SkScalarToLua(x) SkScalarToDouble(x) |
| 25 #define SkLuaToScalar(x) SkDoubleToScalar(x) | 26 #define SkLuaToScalar(x) SkDoubleToScalar(x) |
| 26 | 27 |
| 27 class SkLua { | 28 class SkLua { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 46 void pushArrayU16(const uint16_t[], int count, const char tableKey[] = NULL)
; | 47 void pushArrayU16(const uint16_t[], int count, const char tableKey[] = NULL)
; |
| 47 void pushColor(SkColor, const char tableKey[] = NULL); | 48 void pushColor(SkColor, const char tableKey[] = NULL); |
| 48 void pushU32(uint32_t, const char tableKey[] = NULL); | 49 void pushU32(uint32_t, const char tableKey[] = NULL); |
| 49 void pushScalar(SkScalar, const char tableKey[] = NULL); | 50 void pushScalar(SkScalar, const char tableKey[] = NULL); |
| 50 void pushRect(const SkRect&, const char tableKey[] = NULL); | 51 void pushRect(const SkRect&, const char tableKey[] = NULL); |
| 51 void pushRRect(const SkRRect&, const char tableKey[] = NULL); | 52 void pushRRect(const SkRRect&, const char tableKey[] = NULL); |
| 52 void pushMatrix(const SkMatrix&, const char tableKey[] = NULL); | 53 void pushMatrix(const SkMatrix&, const char tableKey[] = NULL); |
| 53 void pushPaint(const SkPaint&, const char tableKey[] = NULL); | 54 void pushPaint(const SkPaint&, const char tableKey[] = NULL); |
| 54 void pushPath(const SkPath&, const char tableKey[] = NULL); | 55 void pushPath(const SkPath&, const char tableKey[] = NULL); |
| 55 void pushCanvas(SkCanvas*, const char tableKey[] = NULL); | 56 void pushCanvas(SkCanvas*, const char tableKey[] = NULL); |
| 57 void pushClipStack(const SkClipStack&, const char tableKey[] = NULL); |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 lua_State* fL; | 60 lua_State* fL; |
| 59 SkString fTermCode; | 61 SkString fTermCode; |
| 60 bool fWeOwnL; | 62 bool fWeOwnL; |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 #endif | 65 #endif |
| OLD | NEW |