.class Lcom/moji/lottie/PathKeyframe$Factory;
.super Ljava/lang/Object;
.source "PathKeyframe.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/lottie/PathKeyframe;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "Factory"
.end annotation


# direct methods
.method private constructor <init>()V
    .locals 0

    .line 22
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;Lcom/moji/lottie/AnimatableValue$Factory;)Lcom/moji/lottie/PathKeyframe;
    .locals 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONObject;",
            "Lcom/moji/lottie/LottieComposition;",
            "Lcom/moji/lottie/AnimatableValue$Factory<",
            "Landroid/graphics/PointF;",
            ">;)",
            "Lcom/moji/lottie/PathKeyframe;"
        }
    .end annotation

    .line 28
    invoke-virtual {p1}, Lcom/moji/lottie/LottieComposition;->g()F

    move-result v0

    .line 27
    invoke-static {p0, p1, v0, p2}, Lcom/moji/lottie/Keyframe$Factory;->a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;FLcom/moji/lottie/AnimatableValue$Factory;)Lcom/moji/lottie/Keyframe;

    move-result-object p2

    const-string v0, "ti"

    .line 31
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v0

    const-string v1, "to"

    .line 32
    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p0

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    if-eqz p0, :cond_0

    .line 34
    invoke-virtual {p1}, Lcom/moji/lottie/LottieComposition;->g()F

    move-result v1

    invoke-static {p0, v1}, Lcom/moji/lottie/JsonUtils;->a(Lorg/json/JSONArray;F)Landroid/graphics/PointF;

    move-result-object v1

    .line 35
    invoke-virtual {p1}, Lcom/moji/lottie/LottieComposition;->g()F

    move-result p0

    invoke-static {v0, p0}, Lcom/moji/lottie/JsonUtils;->a(Lorg/json/JSONArray;F)Landroid/graphics/PointF;

    move-result-object p0

    goto :goto_0

    :cond_0
    move-object p0, v1

    .line 38
    :goto_0
    new-instance v0, Lcom/moji/lottie/PathKeyframe;

    iget-object v2, p2, Lcom/moji/lottie/Keyframe;->a:Ljava/lang/Object;

    move-object v4, v2

    check-cast v4, Landroid/graphics/PointF;

    iget-object v2, p2, Lcom/moji/lottie/Keyframe;->b:Ljava/lang/Object;

    move-object v5, v2

    check-cast v5, Landroid/graphics/PointF;

    iget-object v6, p2, Lcom/moji/lottie/Keyframe;->c:Landroid/view/animation/Interpolator;

    iget v7, p2, Lcom/moji/lottie/Keyframe;->d:F

    iget-object v8, p2, Lcom/moji/lottie/Keyframe;->e:Ljava/lang/Float;

    const/4 v9, 0x0

    move-object v2, v0

    move-object v3, p1

    invoke-direct/range {v2 .. v9}, Lcom/moji/lottie/PathKeyframe;-><init>(Lcom/moji/lottie/LottieComposition;Landroid/graphics/PointF;Landroid/graphics/PointF;Landroid/view/animation/Interpolator;FLjava/lang/Float;Lcom/moji/lottie/PathKeyframe$1;)V

    .line 43
    iget-object p1, p2, Lcom/moji/lottie/Keyframe;->b:Ljava/lang/Object;

    if-eqz p1, :cond_1

    iget-object p1, p2, Lcom/moji/lottie/Keyframe;->a:Ljava/lang/Object;

    if-eqz p1, :cond_1

    iget-object p1, p2, Lcom/moji/lottie/Keyframe;->a:Ljava/lang/Object;

    check-cast p1, Landroid/graphics/PointF;

    iget-object v2, p2, Lcom/moji/lottie/Keyframe;->b:Ljava/lang/Object;

    check-cast v2, Landroid/graphics/PointF;

    iget v2, v2, Landroid/graphics/PointF;->x:F

    iget-object v3, p2, Lcom/moji/lottie/Keyframe;->b:Ljava/lang/Object;

    check-cast v3, Landroid/graphics/PointF;

    iget v3, v3, Landroid/graphics/PointF;->y:F

    .line 44
    invoke-virtual {p1, v2, v3}, Landroid/graphics/PointF;->equals(FF)Z

    move-result p1

    if-eqz p1, :cond_1

    const/4 p1, 0x1

    goto :goto_1

    :cond_1
    const/4 p1, 0x0

    .line 46
    :goto_1
    iget-object v2, v0, Lcom/moji/lottie/PathKeyframe;->b:Ljava/lang/Object;

    if-eqz v2, :cond_2

    if-nez p1, :cond_2

    .line 47
    iget-object p1, p2, Lcom/moji/lottie/Keyframe;->a:Ljava/lang/Object;

    check-cast p1, Landroid/graphics/PointF;

    iget-object p2, p2, Lcom/moji/lottie/Keyframe;->b:Ljava/lang/Object;

    check-cast p2, Landroid/graphics/PointF;

    invoke-static {p1, p2, v1, p0}, Lcom/moji/lottie/Utils;->a(Landroid/graphics/PointF;Landroid/graphics/PointF;Landroid/graphics/PointF;Landroid/graphics/PointF;)Landroid/graphics/Path;

    move-result-object p0

    invoke-static {v0, p0}, Lcom/moji/lottie/PathKeyframe;->a(Lcom/moji/lottie/PathKeyframe;Landroid/graphics/Path;)Landroid/graphics/Path;

    :cond_2
    return-object v0
.end method
