Rabbit-R1/switch port/java/sources/com/airbnb/lottie/parser/ShapePathParser.java

39 lines
1.4 KiB
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package com.airbnb.lottie.parser;
import com.airbnb.lottie.LottieComposition;
import com.airbnb.lottie.model.animatable.AnimatableShapeValue;
import com.airbnb.lottie.model.content.ShapePath;
import com.airbnb.lottie.parser.moshi.JsonReader;
import java.io.IOException;
/* loaded from: classes2.dex */
class ShapePathParser {
static JsonReader.Options NAMES = JsonReader.Options.of("nm", "ind", "ks", "hd");
private ShapePathParser() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static ShapePath parse(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException {
String str = null;
int i = 0;
boolean z = false;
AnimatableShapeValue animatableShapeValue = null;
while (jsonReader.hasNext()) {
int selectName = jsonReader.selectName(NAMES);
if (selectName == 0) {
str = jsonReader.nextString();
} else if (selectName == 1) {
i = jsonReader.nextInt();
} else if (selectName == 2) {
animatableShapeValue = AnimatableValueParser.parseShapeData(jsonReader, lottieComposition);
} else if (selectName == 3) {
z = jsonReader.nextBoolean();
} else {
jsonReader.skipValue();
}
}
return new ShapePath(str, i, animatableShapeValue, z);
}
}