blob: 2bb905711bd0c83ba948a8b8498438d49eaa8c74 [file] [log] [blame]
package com.airbnb.lottie.model.animatable;
import android.graphics.Path;
import com.airbnb.lottie.LottieComposition;
import com.airbnb.lottie.animation.Keyframe;
import com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation;
import com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation;
import com.airbnb.lottie.model.content.ShapeData;
import org.json.JSONObject;
import java.util.List;
public class AnimatableShapeValue extends BaseAnimatableValue<ShapeData, Path> {
private AnimatableShapeValue(List<Keyframe<ShapeData>> keyframes) {
super(keyframes);
}
@Override public BaseKeyframeAnimation<ShapeData, Path> createAnimation() {
return new ShapeKeyframeAnimation(keyframes);
}
public static final class Factory {
private Factory() {
}
public static AnimatableShapeValue newInstance(JSONObject json, LottieComposition composition) {
return new AnimatableShapeValue(
AnimatableValueParser
.newInstance(json, composition.getDpScale(), composition, ShapeData.Factory.INSTANCE)
);
}
}
}