Rabbit-R1/android (non root)/java/sources/com/airbnb/lottie/animation/keyframe/TextKeyframeAnimation.java

47 lines
2.8 KiB
Java
Raw Normal View History

2024-05-21 21:08:36 +00: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: classes2.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(final LottieValueCallback<String> lottieValueCallback) {
final LottieFrameInfo lottieFrameInfo = new LottieFrameInfo();
final DocumentData documentData = new DocumentData();
super.setValueCallback(new LottieValueCallback<DocumentData>() { // from class: com.airbnb.lottie.animation.keyframe.TextKeyframeAnimation.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.airbnb.lottie.value.LottieValueCallback
public DocumentData getValue(LottieFrameInfo<DocumentData> lottieFrameInfo2) {
lottieFrameInfo.set(lottieFrameInfo2.getStartFrame(), lottieFrameInfo2.getEndFrame(), lottieFrameInfo2.getStartValue().text, lottieFrameInfo2.getEndValue().text, lottieFrameInfo2.getLinearKeyframeProgress(), lottieFrameInfo2.getInterpolatedKeyframeProgress(), lottieFrameInfo2.getOverallProgress());
String str = (String) lottieValueCallback.getValue(lottieFrameInfo);
DocumentData endValue = lottieFrameInfo2.getInterpolatedKeyframeProgress() == 1.0f ? lottieFrameInfo2.getEndValue() : lottieFrameInfo2.getStartValue();
documentData.set(str, endValue.fontName, endValue.size, endValue.justification, endValue.tracking, endValue.lineHeight, endValue.baselineShift, endValue.color, endValue.strokeColor, endValue.strokeWidth, endValue.strokeOverFill, endValue.boxPosition, endValue.boxSize);
return documentData;
}
});
}
}