mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 01:22:33 -06:00
52 lines
2.2 KiB
Java
52 lines
2.2 KiB
Java
package com.airbnb.lottie.parser;
|
|
|
|
import android.graphics.Path;
|
|
import com.airbnb.lottie.LottieComposition;
|
|
import com.airbnb.lottie.model.animatable.AnimatableColorValue;
|
|
import com.airbnb.lottie.model.animatable.AnimatableIntegerValue;
|
|
import com.airbnb.lottie.model.content.ShapeFill;
|
|
import com.airbnb.lottie.parser.moshi.JsonReader;
|
|
import com.airbnb.lottie.value.Keyframe;
|
|
import java.io.IOException;
|
|
import java.util.Collections;
|
|
|
|
/* loaded from: classes2.dex */
|
|
class ShapeFillParser {
|
|
private static final JsonReader.Options NAMES = JsonReader.Options.of("nm", "c", "o", "fillEnabled", "r", "hd");
|
|
|
|
private ShapeFillParser() {
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static ShapeFill parse(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException {
|
|
AnimatableIntegerValue animatableIntegerValue = null;
|
|
String str = null;
|
|
AnimatableColorValue animatableColorValue = null;
|
|
boolean z = false;
|
|
boolean z2 = false;
|
|
int i = 1;
|
|
while (jsonReader.hasNext()) {
|
|
int selectName = jsonReader.selectName(NAMES);
|
|
if (selectName == 0) {
|
|
str = jsonReader.nextString();
|
|
} else if (selectName == 1) {
|
|
animatableColorValue = AnimatableValueParser.parseColor(jsonReader, lottieComposition);
|
|
} else if (selectName == 2) {
|
|
animatableIntegerValue = AnimatableValueParser.parseInteger(jsonReader, lottieComposition);
|
|
} else if (selectName == 3) {
|
|
z = jsonReader.nextBoolean();
|
|
} else if (selectName == 4) {
|
|
i = jsonReader.nextInt();
|
|
} else if (selectName == 5) {
|
|
z2 = jsonReader.nextBoolean();
|
|
} else {
|
|
jsonReader.skipName();
|
|
jsonReader.skipValue();
|
|
}
|
|
}
|
|
if (animatableIntegerValue == null) {
|
|
animatableIntegerValue = new AnimatableIntegerValue(Collections.singletonList(new Keyframe(100)));
|
|
}
|
|
return new ShapeFill(str, z, i == 1 ? Path.FillType.WINDING : Path.FillType.EVEN_ODD, animatableColorValue, animatableIntegerValue, z2);
|
|
}
|
|
}
|