Rabbit-R1/switch port/java/sources/com/airbnb/lottie/parser/PolystarShapeParser.java
2024-05-21 17:08:36 -04:00

80 lines
3.5 KiB
Java

package com.airbnb.lottie.parser;
import android.graphics.PointF;
import com.airbnb.lottie.LottieComposition;
import com.airbnb.lottie.model.animatable.AnimatableFloatValue;
import com.airbnb.lottie.model.animatable.AnimatableValue;
import com.airbnb.lottie.model.content.PolystarShape;
import com.airbnb.lottie.parser.moshi.JsonReader;
import io.sentry.protocol.OperatingSystem;
import java.io.IOException;
/* loaded from: classes2.dex */
class PolystarShapeParser {
private static final JsonReader.Options NAMES = JsonReader.Options.of("nm", "sy", "pt", "p", "r", "or", OperatingSystem.TYPE, "ir", "is", "hd", "d");
private PolystarShapeParser() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static PolystarShape parse(JsonReader jsonReader, LottieComposition lottieComposition, int i) throws IOException {
boolean z = false;
boolean z2 = i == 3;
String str = null;
PolystarShape.Type type = null;
AnimatableFloatValue animatableFloatValue = null;
AnimatableValue<PointF, PointF> animatableValue = null;
AnimatableFloatValue animatableFloatValue2 = null;
AnimatableFloatValue animatableFloatValue3 = null;
AnimatableFloatValue animatableFloatValue4 = null;
AnimatableFloatValue animatableFloatValue5 = null;
AnimatableFloatValue animatableFloatValue6 = null;
while (jsonReader.hasNext()) {
switch (jsonReader.selectName(NAMES)) {
case 0:
str = jsonReader.nextString();
break;
case 1:
type = PolystarShape.Type.forValue(jsonReader.nextInt());
break;
case 2:
animatableFloatValue = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
break;
case 3:
animatableValue = AnimatablePathValueParser.parseSplitPath(jsonReader, lottieComposition);
break;
case 4:
animatableFloatValue2 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
break;
case 5:
animatableFloatValue4 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition);
break;
case 6:
animatableFloatValue6 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
break;
case 7:
animatableFloatValue3 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition);
break;
case 8:
animatableFloatValue5 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
break;
case 9:
z = jsonReader.nextBoolean();
break;
case 10:
if (jsonReader.nextInt() != 3) {
z2 = false;
break;
} else {
z2 = true;
break;
}
default:
jsonReader.skipName();
jsonReader.skipValue();
break;
}
}
return new PolystarShape(str, type, animatableFloatValue, animatableValue, animatableFloatValue2, animatableFloatValue3, animatableFloatValue4, animatableFloatValue5, animatableFloatValue6, z, z2);
}
}