Index: src/utils/SkLua.cpp |
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp |
index 944b12a3ed6ebaf77643247237c268d94c5aa150..4c0834b13a2ab71bf530e13c29cff7d85a166116 100644 |
--- a/src/utils/SkLua.cpp |
+++ b/src/utils/SkLua.cpp |
@@ -664,8 +664,32 @@ static int lmatrix_getType(lua_State* L) { |
return 1; |
} |
+static int lmatrix_getScaleX(lua_State* L) { |
+ lua_pushnumber(L, get_obj<SkMatrix>(L,1)->getScaleX()); |
+ return 1; |
+} |
+ |
+static int lmatrix_getScaleY(lua_State* L) { |
+ lua_pushnumber(L, get_obj<SkMatrix>(L,1)->getScaleY()); |
+ return 1; |
+} |
+ |
+static int lmatrix_getTranslateX(lua_State* L) { |
+ lua_pushnumber(L, get_obj<SkMatrix>(L,1)->getTranslateX()); |
+ return 1; |
+} |
+ |
+static int lmatrix_getTranslateY(lua_State* L) { |
+ lua_pushnumber(L, get_obj<SkMatrix>(L,1)->getTranslateY()); |
+ return 1; |
+} |
+ |
static const struct luaL_Reg gSkMatrix_Methods[] = { |
{ "getType", lmatrix_getType }, |
+ { "getScaleX", lmatrix_getScaleX }, |
+ { "getScaleY", lmatrix_getScaleY }, |
+ { "getTranslateX", lmatrix_getTranslateX }, |
+ { "getTranslateY", lmatrix_getTranslateY }, |
{ NULL, NULL } |
}; |