| 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 static int lpaint_isLinearText(lua_State* L) { | 686 static int lpaint_isLinearText(lua_State* L) { |
| 687 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isLinearText()); | 687 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isLinearText()); |
| 688 return 1; | 688 return 1; |
| 689 } | 689 } |
| 690 | 690 |
| 691 static int lpaint_isSubpixelText(lua_State* L) { | 691 static int lpaint_isSubpixelText(lua_State* L) { |
| 692 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isSubpixelText()); | 692 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isSubpixelText()); |
| 693 return 1; | 693 return 1; |
| 694 } | 694 } |
| 695 | 695 |
| 696 static int lpaint_setSubpixelText(lua_State* L) { |
| 697 get_obj<SkPaint>(L, 1)->setSubpixelText(lua2bool(L, 2)); |
| 698 return 1; |
| 699 } |
| 700 |
| 696 static int lpaint_isDevKernText(lua_State* L) { | 701 static int lpaint_isDevKernText(lua_State* L) { |
| 697 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isDevKernText()); | 702 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isDevKernText()); |
| 698 return 1; | 703 return 1; |
| 699 } | 704 } |
| 700 | 705 |
| 701 static int lpaint_isLCDRenderText(lua_State* L) { | 706 static int lpaint_isLCDRenderText(lua_State* L) { |
| 702 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isLCDRenderText()); | 707 lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isLCDRenderText()); |
| 703 return 1; | 708 return 1; |
| 704 } | 709 } |
| 705 | 710 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 | 934 |
| 930 static const struct luaL_Reg gSkPaint_Methods[] = { | 935 static const struct luaL_Reg gSkPaint_Methods[] = { |
| 931 { "isAntiAlias", lpaint_isAntiAlias }, | 936 { "isAntiAlias", lpaint_isAntiAlias }, |
| 932 { "setAntiAlias", lpaint_setAntiAlias }, | 937 { "setAntiAlias", lpaint_setAntiAlias }, |
| 933 { "isDither", lpaint_isDither }, | 938 { "isDither", lpaint_isDither }, |
| 934 { "isUnderlineText", lpaint_isUnderlineText }, | 939 { "isUnderlineText", lpaint_isUnderlineText }, |
| 935 { "isStrikeThruText", lpaint_isStrikeThruText }, | 940 { "isStrikeThruText", lpaint_isStrikeThruText }, |
| 936 { "isFakeBoldText", lpaint_isFakeBoldText }, | 941 { "isFakeBoldText", lpaint_isFakeBoldText }, |
| 937 { "isLinearText", lpaint_isLinearText }, | 942 { "isLinearText", lpaint_isLinearText }, |
| 938 { "isSubpixelText", lpaint_isSubpixelText }, | 943 { "isSubpixelText", lpaint_isSubpixelText }, |
| 944 { "setSubpixelText", lpaint_setSubpixelText }, |
| 939 { "isDevKernText", lpaint_isDevKernText }, | 945 { "isDevKernText", lpaint_isDevKernText }, |
| 940 { "isLCDRenderText", lpaint_isLCDRenderText }, | 946 { "isLCDRenderText", lpaint_isLCDRenderText }, |
| 941 { "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText }, | 947 { "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText }, |
| 942 { "isAutohinted", lpaint_isAutohinted }, | 948 { "isAutohinted", lpaint_isAutohinted }, |
| 943 { "isVerticalText", lpaint_isVerticalText }, | 949 { "isVerticalText", lpaint_isVerticalText }, |
| 944 { "getColor", lpaint_getColor }, | 950 { "getColor", lpaint_getColor }, |
| 945 { "setColor", lpaint_setColor }, | 951 { "setColor", lpaint_setColor }, |
| 946 { "getTextSize", lpaint_getTextSize }, | 952 { "getTextSize", lpaint_getTextSize }, |
| 947 { "setTextSize", lpaint_setTextSize }, | 953 { "setTextSize", lpaint_setTextSize }, |
| 948 { "getTextScaleX", lpaint_getTextScaleX }, | 954 { "getTextScaleX", lpaint_getTextScaleX }, |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 REG_CLASS(L, SkShader); | 1541 REG_CLASS(L, SkShader); |
| 1536 REG_CLASS(L, SkTypeface); | 1542 REG_CLASS(L, SkTypeface); |
| 1537 REG_CLASS(L, SkMatrix); | 1543 REG_CLASS(L, SkMatrix); |
| 1538 } | 1544 } |
| 1539 | 1545 |
| 1540 extern "C" int luaopen_skia(lua_State* L); | 1546 extern "C" int luaopen_skia(lua_State* L); |
| 1541 extern "C" int luaopen_skia(lua_State* L) { | 1547 extern "C" int luaopen_skia(lua_State* L) { |
| 1542 SkLua::Load(L); | 1548 SkLua::Load(L); |
| 1543 return 0; | 1549 return 0; |
| 1544 } | 1550 } |
| OLD | NEW |