aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-26 21:38:47 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-26 21:38:47 +0000
commitc530208ab02410df9efdabcfd50f42ec4c7fb750 (patch)
tree728074a76eafeb6c52ccbbf296deb58b8192e9a5 /src
parent5007aab81ad1394f4ab7833ea230f6462aa07e69 (diff)
Add point count to lua SkPath.
Add some scripts for classifying rrects and counting complex clip combinations. R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/181843004 git-svn-id: http://skia.googlecode.com/svn/trunk@13601 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/utils/SkLua.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index d1193a7693..4b87458923 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 },