what-the-bank/sources/com/airbnb/lottie/model/animatable/AnimatablePathValue.java

36 lines
1.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.airbnb.lottie.model.animatable;
import android.graphics.PointF;
import com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation;
import com.airbnb.lottie.animation.keyframe.PathKeyframeAnimation;
import com.airbnb.lottie.animation.keyframe.PointKeyframeAnimation;
import com.airbnb.lottie.value.Keyframe;
import java.util.List;
/* loaded from: classes.dex */
public class AnimatablePathValue implements AnimatableValue<PointF, PointF> {
private final List<Keyframe<PointF>> keyframes;
public AnimatablePathValue(List<Keyframe<PointF>> list) {
this.keyframes = list;
}
@Override // com.airbnb.lottie.model.animatable.AnimatableValue
public boolean isStatic() {
return this.keyframes.size() == 1 && this.keyframes.get(0).isStatic();
}
@Override // com.airbnb.lottie.model.animatable.AnimatableValue
public BaseKeyframeAnimation<PointF, PointF> createAnimation() {
if (this.keyframes.get(0).isStatic()) {
return new PointKeyframeAnimation(this.keyframes);
}
return new PathKeyframeAnimation(this.keyframes);
}
@Override // com.airbnb.lottie.model.animatable.AnimatableValue
public List<Keyframe<PointF>> getKeyframes() {
return this.keyframes;
}
}