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

Unified Diff: src/utils/SkLua.cpp

Issue 181843004: Add point count to lua SkPath and two lua scripts for clipping (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: comment fix Created 6 years, 10 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 | « no previous file | tools/lua/classify_rrect_clips.lua » ('j') | 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 d1193a7693178e05bb2d534b1be04f59ae726693..4b874589234fec916a86f31e6f92545738890a4d 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -1137,6 +1137,11 @@ static int lpath_isNestedRects(lua_State* L) {
return ret_count;
}
+static int lpath_countPoints(lua_State* L) {
+ lua_pushinteger(L, get_obj<SkPath>(L, 1)->countPoints());
+ return 1;
+}
+
static int lpath_reset(lua_State* L) {
get_obj<SkPath>(L, 1)->reset();
return 0;
@@ -1183,6 +1188,7 @@ static const struct luaL_Reg gSkPath_Methods[] = {
{ "isEmpty", lpath_isEmpty },
{ "isRect", lpath_isRect },
{ "isNestedRects", lpath_isNestedRects },
+ { "countPoints", lpath_countPoints },
{ "reset", lpath_reset },
{ "moveTo", lpath_moveTo },
{ "lineTo", lpath_lineTo },
« no previous file with comments | « no previous file | tools/lua/classify_rrect_clips.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698