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

32 lines
1 KiB
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package com.airbnb.lottie.parser;
import com.airbnb.lottie.parser.moshi.JsonReader;
import com.airbnb.lottie.value.ScaleXY;
import java.io.IOException;
/* loaded from: classes2.dex */
public class ScaleXYParser implements ValueParser<ScaleXY> {
public static final ScaleXYParser INSTANCE = new ScaleXYParser();
private ScaleXYParser() {
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.airbnb.lottie.parser.ValueParser
public ScaleXY parse(JsonReader jsonReader, float f) throws IOException {
boolean z = jsonReader.peek() == JsonReader.Token.BEGIN_ARRAY;
if (z) {
jsonReader.beginArray();
}
float nextDouble = (float) jsonReader.nextDouble();
float nextDouble2 = (float) jsonReader.nextDouble();
while (jsonReader.hasNext()) {
jsonReader.skipValue();
}
if (z) {
jsonReader.endArray();
}
return new ScaleXY((nextDouble / 100.0f) * f, (nextDouble2 / 100.0f) * f);
}
}