blob: 54622723a938003522d14383d0f6d7cef871f460 [file] [log] [blame]
package com.airbnb.lottie;
import android.graphics.Path;
import java.util.List;
class ShapeKeyframeAnimation extends BaseKeyframeAnimation<ShapeData, Path> {
private final ShapeData tempShapeData = new ShapeData();
private final Path tempPath = new Path();
ShapeKeyframeAnimation(List<Keyframe<ShapeData>> keyframes) {
super(keyframes);
}
@Override public Path getValue(Keyframe<ShapeData> keyframe, float keyframeProgress) {
ShapeData startShapeData = keyframe.startValue;
ShapeData endShapeData = keyframe.endValue;
tempShapeData.interpolateBetween(startShapeData, endShapeData, keyframeProgress);
MiscUtils.getPathFromData(tempShapeData, tempPath);
return tempPath;
}
}