.class Lcom/moji/lottie/EllipseContent;
.super Ljava/lang/Object;
.source "EllipseContent.java"

# interfaces
.implements Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;
.implements Lcom/moji/lottie/PathContent;


# instance fields
.field private final a:Landroid/graphics/Path;

.field private final b:Ljava/lang/String;

.field private final c:Lcom/moji/lottie/LottieDrawable;

.field private final d:Lcom/moji/lottie/BaseKeyframeAnimation;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/moji/lottie/BaseKeyframeAnimation<",
            "*",
            "Landroid/graphics/PointF;",
            ">;"
        }
    .end annotation
.end field

.field private final e:Lcom/moji/lottie/BaseKeyframeAnimation;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/moji/lottie/BaseKeyframeAnimation<",
            "*",
            "Landroid/graphics/PointF;",
            ">;"
        }
    .end annotation
.end field

.field private f:Lcom/moji/lottie/TrimPathContent;
    .annotation build Landroid/support/annotation/Nullable;
    .end annotation
.end field

.field private g:Z


# direct methods
.method constructor <init>(Lcom/moji/lottie/LottieDrawable;Lcom/moji/lottie/BaseLayer;Lcom/moji/lottie/CircleShape;)V
    .locals 1

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

    .line 12
    new-instance v0, Landroid/graphics/Path;

    invoke-direct {v0}, Landroid/graphics/Path;-><init>()V

    iput-object v0, p0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    .line 24
    invoke-virtual {p3}, Lcom/moji/lottie/CircleShape;->a()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/lottie/EllipseContent;->b:Ljava/lang/String;

    .line 25
    iput-object p1, p0, Lcom/moji/lottie/EllipseContent;->c:Lcom/moji/lottie/LottieDrawable;

    .line 26
    invoke-virtual {p3}, Lcom/moji/lottie/CircleShape;->c()Lcom/moji/lottie/AnimatablePointValue;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/lottie/AnimatablePointValue;->a()Lcom/moji/lottie/KeyframeAnimation;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/lottie/EllipseContent;->d:Lcom/moji/lottie/BaseKeyframeAnimation;

    .line 27
    invoke-virtual {p3}, Lcom/moji/lottie/CircleShape;->b()Lcom/moji/lottie/AnimatableValue;

    move-result-object p1

    invoke-interface {p1}, Lcom/moji/lottie/AnimatableValue;->b()Lcom/moji/lottie/BaseKeyframeAnimation;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/lottie/EllipseContent;->e:Lcom/moji/lottie/BaseKeyframeAnimation;

    .line 29
    iget-object p1, p0, Lcom/moji/lottie/EllipseContent;->d:Lcom/moji/lottie/BaseKeyframeAnimation;

    invoke-virtual {p2, p1}, Lcom/moji/lottie/BaseLayer;->a(Lcom/moji/lottie/BaseKeyframeAnimation;)V

    .line 30
    iget-object p1, p0, Lcom/moji/lottie/EllipseContent;->e:Lcom/moji/lottie/BaseKeyframeAnimation;

    invoke-virtual {p2, p1}, Lcom/moji/lottie/BaseLayer;->a(Lcom/moji/lottie/BaseKeyframeAnimation;)V

    .line 32
    iget-object p1, p0, Lcom/moji/lottie/EllipseContent;->d:Lcom/moji/lottie/BaseKeyframeAnimation;

    invoke-virtual {p1, p0}, Lcom/moji/lottie/BaseKeyframeAnimation;->a(Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;)V

    .line 33
    iget-object p1, p0, Lcom/moji/lottie/EllipseContent;->e:Lcom/moji/lottie/BaseKeyframeAnimation;

    invoke-virtual {p1, p0}, Lcom/moji/lottie/BaseKeyframeAnimation;->a(Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;)V

    return-void
.end method

.method private b()V
    .locals 1

    const/4 v0, 0x0

    .line 42
    iput-boolean v0, p0, Lcom/moji/lottie/EllipseContent;->g:Z

    .line 43
    iget-object v0, p0, Lcom/moji/lottie/EllipseContent;->c:Lcom/moji/lottie/LottieDrawable;

    invoke-virtual {v0}, Lcom/moji/lottie/LottieDrawable;->invalidateSelf()V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 0

    .line 38
    invoke-direct {p0}, Lcom/moji/lottie/EllipseContent;->b()V

    return-void
.end method

.method public a(Ljava/util/List;Ljava/util/List;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/moji/lottie/Content;",
            ">;",
            "Ljava/util/List<",
            "Lcom/moji/lottie/Content;",
            ">;)V"
        }
    .end annotation

    const/4 p2, 0x0

    .line 48
    :goto_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge p2, v0, :cond_1

    .line 49
    invoke-interface {p1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/lottie/Content;

    .line 50
    instance-of v1, v0, Lcom/moji/lottie/TrimPathContent;

    if-eqz v1, :cond_0

    check-cast v0, Lcom/moji/lottie/TrimPathContent;

    .line 51
    invoke-virtual {v0}, Lcom/moji/lottie/TrimPathContent;->b()Lcom/moji/lottie/ShapeTrimPath$Type;

    move-result-object v1

    sget-object v2, Lcom/moji/lottie/ShapeTrimPath$Type;->Simultaneously:Lcom/moji/lottie/ShapeTrimPath$Type;

    if-ne v1, v2, :cond_0

    .line 52
    iput-object v0, p0, Lcom/moji/lottie/EllipseContent;->f:Lcom/moji/lottie/TrimPathContent;

    .line 53
    iget-object v0, p0, Lcom/moji/lottie/EllipseContent;->f:Lcom/moji/lottie/TrimPathContent;

    invoke-virtual {v0, p0}, Lcom/moji/lottie/TrimPathContent;->a(Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;)V

    :cond_0
    add-int/lit8 p2, p2, 0x1

    goto :goto_0

    :cond_1
    return-void
.end method

.method public d()Landroid/graphics/Path;
    .locals 19

    move-object/from16 v0, p0

    .line 65
    iget-boolean v1, v0, Lcom/moji/lottie/EllipseContent;->g:Z

    if-eqz v1, :cond_0

    .line 66
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    return-object v1

    .line 69
    :cond_0
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    invoke-virtual {v1}, Landroid/graphics/Path;->reset()V

    .line 72
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->d:Lcom/moji/lottie/BaseKeyframeAnimation;

    invoke-virtual {v1}, Lcom/moji/lottie/BaseKeyframeAnimation;->b()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/graphics/PointF;

    .line 73
    iget v2, v1, Landroid/graphics/PointF;->x:F

    const/high16 v3, 0x40000000    # 2.0f

    div-float/2addr v2, v3

    .line 74
    iget v1, v1, Landroid/graphics/PointF;->y:F

    div-float/2addr v1, v3

    const v3, 0x3f0d6239    # 0.55228f

    mul-float v11, v2, v3

    mul-float v3, v3, v1

    .line 80
    iget-object v4, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    invoke-virtual {v4}, Landroid/graphics/Path;->reset()V

    .line 81
    iget-object v4, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    neg-float v15, v1

    const/4 v12, 0x0

    invoke-virtual {v4, v12, v15}, Landroid/graphics/Path;->moveTo(FF)V

    .line 82
    iget-object v4, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    add-float v13, v11, v12

    sub-float v14, v12, v3

    const/4 v10, 0x0

    move v5, v13

    move v6, v15

    move v7, v2

    move v8, v14

    move v9, v2

    invoke-virtual/range {v4 .. v10}, Landroid/graphics/Path;->cubicTo(FFFFFF)V

    .line 83
    iget-object v4, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    add-float/2addr v3, v12

    const/4 v9, 0x0

    move v5, v2

    move v6, v3

    move v7, v13

    move v8, v1

    move v10, v1

    invoke-virtual/range {v4 .. v10}, Landroid/graphics/Path;->cubicTo(FFFFFF)V

    .line 84
    iget-object v4, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    sub-float v11, v12, v11

    neg-float v13, v2

    const/4 v10, 0x0

    move v5, v11

    move v6, v1

    move v7, v13

    move v8, v3

    move v9, v13

    invoke-virtual/range {v4 .. v10}, Landroid/graphics/Path;->cubicTo(FFFFFF)V

    .line 85
    iget-object v12, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    const/16 v17, 0x0

    move v1, v15

    move v15, v11

    move/from16 v16, v1

    move/from16 v18, v1

    invoke-virtual/range {v12 .. v18}, Landroid/graphics/Path;->cubicTo(FFFFFF)V

    .line 87
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->e:Lcom/moji/lottie/BaseKeyframeAnimation;

    invoke-virtual {v1}, Lcom/moji/lottie/BaseKeyframeAnimation;->b()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/graphics/PointF;

    .line 88
    iget-object v2, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

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

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

    invoke-virtual {v2, v3, v1}, Landroid/graphics/Path;->offset(FF)V

    .line 90
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    invoke-virtual {v1}, Landroid/graphics/Path;->close()V

    .line 92
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    iget-object v2, v0, Lcom/moji/lottie/EllipseContent;->f:Lcom/moji/lottie/TrimPathContent;

    invoke-static {v1, v2}, Lcom/moji/lottie/Utils;->a(Landroid/graphics/Path;Lcom/moji/lottie/TrimPathContent;)V

    const/4 v1, 0x1

    .line 94
    iput-boolean v1, v0, Lcom/moji/lottie/EllipseContent;->g:Z

    .line 95
    iget-object v1, v0, Lcom/moji/lottie/EllipseContent;->a:Landroid/graphics/Path;

    return-object v1
.end method

.method public e()Ljava/lang/String;
    .locals 1

    .line 60
    iget-object v0, p0, Lcom/moji/lottie/EllipseContent;->b:Ljava/lang/String;

    return-object v0
.end method
