blob: e01be61e003e9bafe2e3335eec53e441f991d4ec [file] [log] [blame]
package com.airbnb.lottie.model.animatable;
import android.graphics.PointF;
import android.util.JsonReader;
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 com.airbnb.lottie.utils.Utils;
import java.io.IOException;
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(
JsonReader reader, LottieComposition composition) throws IOException {
return new AnimatablePointValue(AnimatableValueParser
.newInstance(reader, Utils.dpScale(), composition, PointFFactory.INSTANCE)
);
}
}
}