what-the-bank/sources/com/airbnb/lottie/animation/keyframe/TextKeyframeAnimation.java

57 lines
3.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.airbnb.lottie.animation.keyframe;
import com.airbnb.lottie.model.DocumentData;
import com.airbnb.lottie.value.Keyframe;
import com.airbnb.lottie.value.LottieFrameInfo;
import com.airbnb.lottie.value.LottieValueCallback;
import java.util.List;
/* loaded from: classes.dex */
public class TextKeyframeAnimation extends KeyframeAnimation<DocumentData> {
@Override // com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation
/* bridge */ /* synthetic */ Object getValue(Keyframe keyframe, float f) {
return getValue((Keyframe<DocumentData>) keyframe, f);
}
public TextKeyframeAnimation(List<Keyframe<DocumentData>> list) {
super(list);
}
@Override // com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation
DocumentData getValue(Keyframe<DocumentData> keyframe, float f) {
if (this.valueCallback != null) {
return (DocumentData) this.valueCallback.getValueInternal(keyframe.startFrame, keyframe.endFrame == null ? Float.MAX_VALUE : keyframe.endFrame.floatValue(), keyframe.startValue, keyframe.endValue == null ? keyframe.startValue : keyframe.endValue, f, getInterpolatedCurrentKeyframeProgress(), getProgress());
}
if (f != 1.0f || keyframe.endValue == null) {
return keyframe.startValue;
}
return keyframe.endValue;
}
public void setStringValueCallback(LottieValueCallback<String> lottieValueCallback) {
super.setValueCallback(new LottieValueCallback<DocumentData>(this, new LottieFrameInfo(), lottieValueCallback, new DocumentData()) { // from class: com.airbnb.lottie.animation.keyframe.TextKeyframeAnimation.1
final TextKeyframeAnimation this$0;
final DocumentData val$documentData;
final LottieFrameInfo val$stringFrameInfo;
final LottieValueCallback val$valueCallback;
{
this.this$0 = this;
this.val$stringFrameInfo = r2;
this.val$valueCallback = lottieValueCallback;
this.val$documentData = r4;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.airbnb.lottie.value.LottieValueCallback
public DocumentData getValue(LottieFrameInfo<DocumentData> lottieFrameInfo) {
this.val$stringFrameInfo.set(lottieFrameInfo.getStartFrame(), lottieFrameInfo.getEndFrame(), lottieFrameInfo.getStartValue().text, lottieFrameInfo.getEndValue().text, lottieFrameInfo.getLinearKeyframeProgress(), lottieFrameInfo.getInterpolatedKeyframeProgress(), lottieFrameInfo.getOverallProgress());
String str = (String) this.val$valueCallback.getValue(this.val$stringFrameInfo);
DocumentData endValue = lottieFrameInfo.getInterpolatedKeyframeProgress() == 1.0f ? lottieFrameInfo.getEndValue() : lottieFrameInfo.getStartValue();
this.val$documentData.set(str, endValue.fontName, endValue.size, endValue.justification, endValue.tracking, endValue.lineHeight, endValue.baselineShift, endValue.color, endValue.strokeColor, endValue.strokeWidth, endValue.strokeOverFill);
return this.val$documentData;
}
});
}
}