use of com.airbnb.lottie.model.content.RectangleShape in project lottie-android by airbnb.
the class RectangleShapeParser method parse.
static RectangleShape parse(JsonReader reader, LottieComposition composition) throws IOException {
String name = null;
AnimatableValue<PointF, PointF> position = null;
AnimatableValue<PointF, PointF> size = null;
AnimatableFloatValue roundedness = null;
boolean hidden = false;
while (reader.hasNext()) {
switch(reader.selectName(NAMES)) {
case 0:
name = reader.nextString();
break;
case 1:
position = AnimatablePathValueParser.parseSplitPath(reader, composition);
break;
case 2:
size = AnimatableValueParser.parsePoint(reader, composition);
break;
case 3:
roundedness = AnimatableValueParser.parseFloat(reader, composition);
break;
case 4:
hidden = reader.nextBoolean();
break;
default:
reader.skipValue();
}
}
return new RectangleShape(name, position, size, roundedness, hidden);
}
Aggregations