FillContent.smali
.class public Lcom/airbnb/lottie/animation/content/FillContent;
.super Ljava/lang/Object;
# interfaces
.implements Lcom/airbnb/lottie/animation/content/DrawingContent;
.implements Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation$AnimationListener;
.implements Lcom/airbnb/lottie/animation/content/KeyPathElementContent;
# instance fields
.field private final a:Landroid/graphics/Path;
.field private final b:Landroid/graphics/Paint;
.field private final c:Lcom/airbnb/lottie/model/layer/BaseLayer;
.field private final d:Ljava/lang/String;
.field private final e:Z
.field private final f:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/airbnb/lottie/animation/content/PathContent;",
">;"
}
.end annotation
.end field
.field private final g:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation<",
"Ljava/lang/Integer;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
.field private final h:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation<",
"Ljava/lang/Integer;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
.field private i:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation<",
"Landroid/graphics/ColorFilter;",
"Landroid/graphics/ColorFilter;",
">;"
}
.end annotation
.end field
.field private final j:Lcom/airbnb/lottie/LottieDrawable;
# direct methods
.method public constructor <init>(Lcom/airbnb/lottie/LottieDrawable;Lcom/airbnb/lottie/model/layer/BaseLayer;Lcom/airbnb/lottie/model/content/ShapeFill;)V
.registers 6
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Landroid/graphics/Path;
invoke-direct {v0}, Landroid/graphics/Path;-><init>()V
iput-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
new-instance v0, Lcom/airbnb/lottie/animation/LPaint;
const/4 v1, 0x1
invoke-direct {v0, v1}, Lcom/airbnb/lottie/animation/LPaint;-><init>(I)V
iput-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->b:Landroid/graphics/Paint;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->f:Ljava/util/List;
iput-object p2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->c:Lcom/airbnb/lottie/model/layer/BaseLayer;
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->d()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->d:Ljava/lang/String;
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->f()Z
move-result v0
iput-boolean v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->e:Z
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->j:Lcom/airbnb/lottie/LottieDrawable;
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->b()Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;
move-result-object p1
if-eqz p1, :cond_64
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->e()Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;
move-result-object p1
if-nez p1, :cond_36
goto :goto_64
:cond_36
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->c()Landroid/graphics/Path$FillType;
move-result-object v0
invoke-virtual {p1, v0}, Landroid/graphics/Path;->setFillType(Landroid/graphics/Path$FillType;)V
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->b()Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;
move-result-object p1
invoke-virtual {p1}, Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;->a()Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
move-result-object p1
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->g:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p1, p0}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->a(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation$AnimationListener;)V
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->g:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p2, p1}, Lcom/airbnb/lottie/model/layer/BaseLayer;->i(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;)V
invoke-virtual {p3}, Lcom/airbnb/lottie/model/content/ShapeFill;->e()Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;
move-result-object p1
invoke-virtual {p1}, Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;->a()Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
move-result-object p1
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->h:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p1, p0}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->a(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation$AnimationListener;)V
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->h:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p2, p1}, Lcom/airbnb/lottie/model/layer/BaseLayer;->i(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;)V
return-void
:cond_64
:goto_64
const/4 p1, 0x0
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->g:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->h:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
return-void
.end method
# virtual methods
.method public a()V
.registers 2
iget-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->j:Lcom/airbnb/lottie/LottieDrawable;
invoke-virtual {v0}, Lcom/airbnb/lottie/LottieDrawable;->invalidateSelf()V
return-void
.end method
.method public b(Ljava/util/List;Ljava/util/List;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/airbnb/lottie/animation/content/Content;",
">;",
"Ljava/util/List<",
"Lcom/airbnb/lottie/animation/content/Content;",
">;)V"
}
.end annotation
const/4 p1, 0x0
:goto_1
invoke-interface {p2}, Ljava/util/List;->size()I
move-result v0
if-ge p1, v0, :cond_1b
invoke-interface {p2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/airbnb/lottie/animation/content/Content;
instance-of v1, v0, Lcom/airbnb/lottie/animation/content/PathContent;
if-eqz v1, :cond_18
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->f:Ljava/util/List;
check-cast v0, Lcom/airbnb/lottie/animation/content/PathContent;
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:cond_18
add-int/lit8 p1, p1, 0x1
goto :goto_1
:cond_1b
return-void
.end method
.method public c(Lcom/airbnb/lottie/model/KeyPath;ILjava/util/List;Lcom/airbnb/lottie/model/KeyPath;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/airbnb/lottie/model/KeyPath;",
"I",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/KeyPath;",
">;",
"Lcom/airbnb/lottie/model/KeyPath;",
")V"
}
.end annotation
invoke-static {p1, p2, p3, p4, p0}, Lcom/airbnb/lottie/utils/MiscUtils;->l(Lcom/airbnb/lottie/model/KeyPath;ILjava/util/List;Lcom/airbnb/lottie/model/KeyPath;Lcom/airbnb/lottie/animation/content/KeyPathElementContent;)V
return-void
.end method
.method public d(Landroid/graphics/RectF;Landroid/graphics/Matrix;Z)V
.registers 7
iget-object p3, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
invoke-virtual {p3}, Landroid/graphics/Path;->reset()V
const/4 p3, 0x0
const/4 v0, 0x0
:goto_7
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->f:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
if-ge v0, v1, :cond_23
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
iget-object v2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->f:Ljava/util/List;
invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/airbnb/lottie/animation/content/PathContent;
invoke-interface {v2}, Lcom/airbnb/lottie/animation/content/PathContent;->getPath()Landroid/graphics/Path;
move-result-object v2
invoke-virtual {v1, v2, p2}, Landroid/graphics/Path;->addPath(Landroid/graphics/Path;Landroid/graphics/Matrix;)V
add-int/lit8 v0, v0, 0x1
goto :goto_7
:cond_23
iget-object p2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
invoke-virtual {p2, p1, p3}, Landroid/graphics/Path;->computeBounds(Landroid/graphics/RectF;Z)V
iget p2, p1, Landroid/graphics/RectF;->left:F
const/high16 p3, 0x3f800000 # 1.0f
sub-float/2addr p2, p3
iget v0, p1, Landroid/graphics/RectF;->top:F
sub-float/2addr v0, p3
iget v1, p1, Landroid/graphics/RectF;->right:F
add-float/2addr v1, p3
iget v2, p1, Landroid/graphics/RectF;->bottom:F
add-float/2addr v2, p3
invoke-virtual {p1, p2, v0, v1, v2}, Landroid/graphics/RectF;->set(FFFF)V
return-void
.end method
.method public f(Landroid/graphics/Canvas;Landroid/graphics/Matrix;I)V
.registers 8
iget-boolean v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->e:Z
if-eqz v0, :cond_5
return-void
:cond_5
const-string v0, "FillContent#draw"
invoke-static {v0}, Lcom/airbnb/lottie/L;->a(Ljava/lang/String;)V
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->b:Landroid/graphics/Paint;
iget-object v2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->g:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
check-cast v2, Lcom/airbnb/lottie/animation/keyframe/ColorKeyframeAnimation;
invoke-virtual {v2}, Lcom/airbnb/lottie/animation/keyframe/ColorKeyframeAnimation;->o()I
move-result v2
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V
int-to-float p3, p3
const/high16 v1, 0x437f0000 # 255.0f
div-float/2addr p3, v1
iget-object v2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->h:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {v2}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->h()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
move-result v2
int-to-float v2, v2
mul-float p3, p3, v2
const/high16 v2, 0x42c80000 # 100.0f
div-float/2addr p3, v2
mul-float p3, p3, v1
float-to-int p3, p3
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->b:Landroid/graphics/Paint;
const/16 v2, 0xff
const/4 v3, 0x0
invoke-static {p3, v3, v2}, Lcom/airbnb/lottie/utils/MiscUtils;->c(III)I
move-result p3
invoke-virtual {v1, p3}, Landroid/graphics/Paint;->setAlpha(I)V
iget-object p3, p0, Lcom/airbnb/lottie/animation/content/FillContent;->i:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
if-eqz p3, :cond_4b
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->b:Landroid/graphics/Paint;
invoke-virtual {p3}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->h()Ljava/lang/Object;
move-result-object p3
check-cast p3, Landroid/graphics/ColorFilter;
invoke-virtual {v1, p3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;
:cond_4b
iget-object p3, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
invoke-virtual {p3}, Landroid/graphics/Path;->reset()V
:goto_50
iget-object p3, p0, Lcom/airbnb/lottie/animation/content/FillContent;->f:Ljava/util/List;
invoke-interface {p3}, Ljava/util/List;->size()I
move-result p3
if-ge v3, p3, :cond_6c
iget-object p3, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
iget-object v1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->f:Ljava/util/List;
invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/airbnb/lottie/animation/content/PathContent;
invoke-interface {v1}, Lcom/airbnb/lottie/animation/content/PathContent;->getPath()Landroid/graphics/Path;
move-result-object v1
invoke-virtual {p3, v1, p2}, Landroid/graphics/Path;->addPath(Landroid/graphics/Path;Landroid/graphics/Matrix;)V
add-int/lit8 v3, v3, 0x1
goto :goto_50
:cond_6c
iget-object p2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->a:Landroid/graphics/Path;
iget-object p3, p0, Lcom/airbnb/lottie/animation/content/FillContent;->b:Landroid/graphics/Paint;
invoke-virtual {p1, p2, p3}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V
invoke-static {v0}, Lcom/airbnb/lottie/L;->b(Ljava/lang/String;)F
return-void
.end method
.method public g(Ljava/lang/Object;Lcom/airbnb/lottie/value/LottieValueCallback;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Lcom/airbnb/lottie/value/LottieValueCallback<",
"TT;>;)V"
}
.end annotation
sget-object v0, Lcom/airbnb/lottie/LottieProperty;->a:Ljava/lang/Integer;
if-ne p1, v0, :cond_a
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->g:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p1, p2}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->m(Lcom/airbnb/lottie/value/LottieValueCallback;)V
goto :goto_38
:cond_a
sget-object v0, Lcom/airbnb/lottie/LottieProperty;->d:Ljava/lang/Integer;
if-ne p1, v0, :cond_14
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->h:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p1, p2}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->m(Lcom/airbnb/lottie/value/LottieValueCallback;)V
goto :goto_38
:cond_14
sget-object v0, Lcom/airbnb/lottie/LottieProperty;->C:Landroid/graphics/ColorFilter;
if-ne p1, v0, :cond_38
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->i:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
if-eqz p1, :cond_21
iget-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->c:Lcom/airbnb/lottie/model/layer/BaseLayer;
invoke-virtual {v0, p1}, Lcom/airbnb/lottie/model/layer/BaseLayer;->C(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;)V
:cond_21
if-nez p2, :cond_27
const/4 p1, 0x0
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->i:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
goto :goto_38
:cond_27
new-instance p1, Lcom/airbnb/lottie/animation/keyframe/ValueCallbackKeyframeAnimation;
invoke-direct {p1, p2}, Lcom/airbnb/lottie/animation/keyframe/ValueCallbackKeyframeAnimation;-><init>(Lcom/airbnb/lottie/value/LottieValueCallback;)V
iput-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->i:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p1, p0}, Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;->a(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation$AnimationListener;)V
iget-object p1, p0, Lcom/airbnb/lottie/animation/content/FillContent;->c:Lcom/airbnb/lottie/model/layer/BaseLayer;
iget-object p2, p0, Lcom/airbnb/lottie/animation/content/FillContent;->i:Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;
invoke-virtual {p1, p2}, Lcom/airbnb/lottie/model/layer/BaseLayer;->i(Lcom/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation;)V
:cond_38
:goto_38
return-void
.end method
.method public getName()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/airbnb/lottie/animation/content/FillContent;->d:Ljava/lang/String;
return-object v0
.end method