add EasingGeometryKeyFrame

This commit is contained in:
NaBian committed 2019-09-26 23:20:05 +08:00
1 parent 39a1a084c6
commit f747e207d1
4 files changed
+85 -8

No files matched your search

@@ -66,5 +66,17 @@ namespace HandyControl.Tools
return Geometry.Parse(builder.ToString());
}
internal static Geometry InterpolateGeometry(double[] from, double[] to, double progress, string[] strings)
{
var accumulated = new double[to.Length];
for (var i = 0; i < to.Length; i++)
{
var fromValue = from[i];
accumulated[i] = fromValue + (to[i] - fromValue) * progress;
}
return ComposeGeometry(strings, accumulated);
}
}
}