Chromium Code Reviews| Index: include/core/SkPath.h |
| diff --git a/include/core/SkPath.h b/include/core/SkPath.h |
| index 7c6fd35d5af8798c74e499644b606c435081d40f..0f98cc47a0f37464d3647176bed9f8aa156f33c7 100644 |
| --- a/include/core/SkPath.h |
| +++ b/include/core/SkPath.h |
| @@ -37,6 +37,27 @@ public: |
| return !(a == b); |
| } |
| + /** Return true if the paths contain an equal array of verbs and weights. Paths |
| + * with equal verb counts can be readily interpolated. If the paths contain one |
| + * or more conics, the conics' weights must also match. |
| + * |
| + * @param compare The path to compare. |
| + * |
| + * @return true if the paths have the same verbs and weights. |
| + */ |
| + bool isInterpolatable(const SkPath& compare) const; |
| + |
|
robertphillips
2016/02/17 21:32:00
identically ?
caryclark
2016/02/17 21:39:21
If I can't spell it, I shouldn't use it (done)
|
| + /** Interpolate between two paths with indentically-sized point arrays. |
|
robertphillips
2016/02/17 21:08:49
conains ?
caryclark
2016/02/17 21:39:21
Done.
|
| + * The out path conains the verbs and weights of this path. |
| + * The out points are a weighted average of this path and the ending path. |
| + * |
| + * @param ending The path to interpolate between. |
| + * @param weight The weight, from 0 to 1. The output points are set to |
| + * (this->points * weight) + ending->points * (1 - weight). |
| + * @return true if the paths could be interpolated. |
| + */ |
| + bool interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const; |
| + |
| #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| /** Returns true if the caller is the only owner of the underlying path data */ |
| bool unique() const { return fPathRef->unique(); } |