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