Index: src/core/SkPathRef.cpp |
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp |
index 49a04999ac201e831363b37a0fdc0b666500bd72..b18055136f54ce2cc1ed95ed7fb569c298ec0c4d 100644 |
--- a/src/core/SkPathRef.cpp |
+++ b/src/core/SkPathRef.cpp |
@@ -299,6 +299,19 @@ void SkPathRef::copy(const SkPathRef& ref, |
SkDEBUGCODE(this->validate();) |
} |
+ |
+void SkPathRef::interpolate(const SkPathRef& ending, SkScalar weight, SkPathRef* out) const { |
+ const SkScalar* inValues = &ending.getPoints()->fX; |
+ SkScalar* outValues = &out->getPoints()->fX; |
+ int count = out->countPoints() * 2; |
+ for (int index = 0; index < count; ++index) { |
+ outValues[index] = outValues[index] * weight + inValues[index] * (1 - weight); |
+ } |
+ out->fBoundsIsDirty = true; |
+ out->fIsOval = false; |
+ out->fIsRRect = false; |
+} |
+ |
SkPoint* SkPathRef::growForRepeatedVerb(int /*SkPath::Verb*/ verb, |
int numVbs, |
SkScalar** weights) { |