| 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 #include "SkLua.h" | 8 #include "SkLua.h" |
| 9 | 9 |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 static int lpaint_setAntiAlias(lua_State* L) { | 754 static int lpaint_setAntiAlias(lua_State* L) { |
| 755 get_obj<SkPaint>(L, 1)->setAntiAlias(lua2bool(L, 2)); | 755 get_obj<SkPaint>(L, 1)->setAntiAlias(lua2bool(L, 2)); |
| 756 return 0; | 756 return 0; |
| 757 } | 757 } |
| 758 | 758 |
| 759 static int lpaint_isDither(lua_State* L) { | 759 static int lpaint_isDither(lua_State* L) { |
| 760 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isDither()); | 760 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isDither()); |
| 761 return 1; | 761 return 1; |
| 762 } | 762 } |
| 763 | 763 |
| 764 static int lpaint_setDither(lua_State* L) { |
| 765 get_obj<SkPaint>(L, 1)->setDither(lua2bool(L, 2)); |
| 766 return 0; |
| 767 } |
| 768 |
| 764 static int lpaint_isUnderlineText(lua_State* L) { | 769 static int lpaint_isUnderlineText(lua_State* L) { |
| 765 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isUnderlineText()); | 770 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isUnderlineText()); |
| 766 return 1; | 771 return 1; |
| 767 } | 772 } |
| 768 | 773 |
| 769 static int lpaint_isStrikeThruText(lua_State* L) { | 774 static int lpaint_isStrikeThruText(lua_State* L) { |
| 770 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isStrikeThruText()); | 775 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isStrikeThruText()); |
| 771 return 1; | 776 return 1; |
| 772 } | 777 } |
| 773 | 778 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 | 1059 |
| 1055 static int lpaint_gc(lua_State* L) { | 1060 static int lpaint_gc(lua_State* L) { |
| 1056 get_obj<SkPaint>(L, 1)->~SkPaint(); | 1061 get_obj<SkPaint>(L, 1)->~SkPaint(); |
| 1057 return 0; | 1062 return 0; |
| 1058 } | 1063 } |
| 1059 | 1064 |
| 1060 static const struct luaL_Reg gSkPaint_Methods[] = { | 1065 static const struct luaL_Reg gSkPaint_Methods[] = { |
| 1061 { "isAntiAlias", lpaint_isAntiAlias }, | 1066 { "isAntiAlias", lpaint_isAntiAlias }, |
| 1062 { "setAntiAlias", lpaint_setAntiAlias }, | 1067 { "setAntiAlias", lpaint_setAntiAlias }, |
| 1063 { "isDither", lpaint_isDither }, | 1068 { "isDither", lpaint_isDither }, |
| 1069 { "setDither", lpaint_setDither }, |
| 1064 { "isUnderlineText", lpaint_isUnderlineText }, | 1070 { "isUnderlineText", lpaint_isUnderlineText }, |
| 1065 { "isStrikeThruText", lpaint_isStrikeThruText }, | 1071 { "isStrikeThruText", lpaint_isStrikeThruText }, |
| 1066 { "isFakeBoldText", lpaint_isFakeBoldText }, | 1072 { "isFakeBoldText", lpaint_isFakeBoldText }, |
| 1067 { "isLinearText", lpaint_isLinearText }, | 1073 { "isLinearText", lpaint_isLinearText }, |
| 1068 { "isSubpixelText", lpaint_isSubpixelText }, | 1074 { "isSubpixelText", lpaint_isSubpixelText }, |
| 1069 { "setSubpixelText", lpaint_setSubpixelText }, | 1075 { "setSubpixelText", lpaint_setSubpixelText }, |
| 1070 { "isDevKernText", lpaint_isDevKernText }, | 1076 { "isDevKernText", lpaint_isDevKernText }, |
| 1071 { "isLCDRenderText", lpaint_isLCDRenderText }, | 1077 { "isLCDRenderText", lpaint_isLCDRenderText }, |
| 1072 { "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText }, | 1078 { "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText }, |
| 1073 { "isAutohinted", lpaint_isAutohinted }, | 1079 { "isAutohinted", lpaint_isAutohinted }, |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 REG_CLASS(L, SkSurface); | 1962 REG_CLASS(L, SkSurface); |
| 1957 REG_CLASS(L, SkTextBlob); | 1963 REG_CLASS(L, SkTextBlob); |
| 1958 REG_CLASS(L, SkTypeface); | 1964 REG_CLASS(L, SkTypeface); |
| 1959 } | 1965 } |
| 1960 | 1966 |
| 1961 extern "C" int luaopen_skia(lua_State* L); | 1967 extern "C" int luaopen_skia(lua_State* L); |
| 1962 extern "C" int luaopen_skia(lua_State* L) { | 1968 extern "C" int luaopen_skia(lua_State* L) { |
| 1963 SkLua::Load(L); | 1969 SkLua::Load(L); |
| 1964 return 0; | 1970 return 0; |
| 1965 } | 1971 } |
| OLD | NEW |