Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: src/utils/SkLua.cpp

Issue 652473002: add key handlers to lua (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleLua.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkLua.cpp
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 1336404d8c58d3542d4af4b22a4e357bdaed7a0f..4a6546575f86ed630962a0bd08769ce2fd9019ef 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -693,6 +693,11 @@ static int lpaint_isSubpixelText(lua_State* L) {
return 1;
}
+static int lpaint_setSubpixelText(lua_State* L) {
+ get_obj<SkPaint>(L, 1)->setSubpixelText(lua2bool(L, 2));
+ return 1;
+}
+
static int lpaint_isDevKernText(lua_State* L) {
lua_pushboolean(L, get_obj<SkPaint>(L, 1)->isDevKernText());
return 1;
@@ -936,6 +941,7 @@ static const struct luaL_Reg gSkPaint_Methods[] = {
{ "isFakeBoldText", lpaint_isFakeBoldText },
{ "isLinearText", lpaint_isLinearText },
{ "isSubpixelText", lpaint_isSubpixelText },
+ { "setSubpixelText", lpaint_setSubpixelText },
{ "isDevKernText", lpaint_isDevKernText },
{ "isLCDRenderText", lpaint_isLCDRenderText },
{ "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText },
« no previous file with comments | « samplecode/SampleLua.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698