add countPoints() and getPoint()
git-svn-id: http://skia.googlecode.com/svn/trunk@494 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 1c77107..2308ec6 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -184,6 +184,13 @@
return count;
}
+SkPoint SkPath::getPoint(int index) const {
+ if ((unsigned)index < (unsigned)fPts.count()) {
+ return fPts[index];
+ }
+ return SkPoint::Make(0, 0);
+}
+
void SkPath::getLastPt(SkPoint* lastPt) const {
SkDEBUGCODE(this->validate();)