Search in sources :

Example 1 with ShapePath

use of com.airbnb.lottie.model.content.ShapePath in project lottie-android by airbnb.

the class ShapePathParser method parse.

static ShapePath parse(JsonReader reader, LottieComposition composition) throws IOException {
    String name = null;
    int ind = 0;
    AnimatableShapeValue shape = null;
    boolean hidden = false;
    while (reader.hasNext()) {
        switch(reader.selectName(NAMES)) {
            case 0:
                name = reader.nextString();
                break;
            case 1:
                ind = reader.nextInt();
                break;
            case 2:
                shape = AnimatableValueParser.parseShapeData(reader, composition);
                break;
            case 3:
                hidden = reader.nextBoolean();
                break;
            default:
                reader.skipValue();
        }
    }
    return new ShapePath(name, ind, shape, hidden);
}
Also used : ShapePath(com.airbnb.lottie.model.content.ShapePath) AnimatableShapeValue(com.airbnb.lottie.model.animatable.AnimatableShapeValue)

Aggregations

AnimatableShapeValue (com.airbnb.lottie.model.animatable.AnimatableShapeValue)1 ShapePath (com.airbnb.lottie.model.content.ShapePath)1