446 lines
11 KiB
Smali
446 lines
11 KiB
Smali
.class Lcom/moji/lottie/FillContent;
|
|
.super Ljava/lang/Object;
|
|
.source "FillContent.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;
|
|
.implements Lcom/moji/lottie/DrawingContent;
|
|
|
|
|
|
# instance fields
|
|
.field private final a:Landroid/graphics/Path;
|
|
|
|
.field private final b:Landroid/graphics/Paint;
|
|
|
|
.field private final c:Ljava/lang/String;
|
|
|
|
.field private final d:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/lottie/PathContent;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final e:Lcom/moji/lottie/KeyframeAnimation;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/moji/lottie/KeyframeAnimation<",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final f:Lcom/moji/lottie/KeyframeAnimation;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/moji/lottie/KeyframeAnimation<",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final g:Lcom/moji/lottie/LottieDrawable;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lcom/moji/lottie/LottieDrawable;Lcom/moji/lottie/BaseLayer;Lcom/moji/lottie/ShapeFill;)V
|
|
.locals 2
|
|
|
|
.line 23
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 15
|
|
new-instance v0, Landroid/graphics/Path;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Path;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
.line 16
|
|
new-instance v0, Landroid/graphics/Paint;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/FillContent;->b:Landroid/graphics/Paint;
|
|
|
|
.line 18
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/FillContent;->d:Ljava/util/List;
|
|
|
|
.line 24
|
|
invoke-virtual {p3}, Lcom/moji/lottie/ShapeFill;->a()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/FillContent;->c:Ljava/lang/String;
|
|
|
|
.line 25
|
|
iput-object p1, p0, Lcom/moji/lottie/FillContent;->g:Lcom/moji/lottie/LottieDrawable;
|
|
|
|
.line 26
|
|
invoke-virtual {p3}, Lcom/moji/lottie/ShapeFill;->b()Lcom/moji/lottie/AnimatableColorValue;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p3}, Lcom/moji/lottie/ShapeFill;->c()Lcom/moji/lottie/AnimatableIntegerValue;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 32
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
invoke-virtual {p3}, Lcom/moji/lottie/ShapeFill;->d()Landroid/graphics/Path$FillType;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Path;->setFillType(Landroid/graphics/Path$FillType;)V
|
|
|
|
.line 34
|
|
invoke-virtual {p3}, Lcom/moji/lottie/ShapeFill;->b()Lcom/moji/lottie/AnimatableColorValue;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/moji/lottie/AnimatableColorValue;->a()Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/lottie/FillContent;->e:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
.line 35
|
|
iget-object p1, p0, Lcom/moji/lottie/FillContent;->e:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
invoke-virtual {p1, p0}, Lcom/moji/lottie/KeyframeAnimation;->a(Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;)V
|
|
|
|
.line 36
|
|
iget-object p1, p0, Lcom/moji/lottie/FillContent;->e:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/lottie/BaseLayer;->a(Lcom/moji/lottie/BaseKeyframeAnimation;)V
|
|
|
|
.line 37
|
|
invoke-virtual {p3}, Lcom/moji/lottie/ShapeFill;->c()Lcom/moji/lottie/AnimatableIntegerValue;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/moji/lottie/AnimatableIntegerValue;->a()Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/lottie/FillContent;->f:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
.line 38
|
|
iget-object p1, p0, Lcom/moji/lottie/FillContent;->f:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
invoke-virtual {p1, p0}, Lcom/moji/lottie/KeyframeAnimation;->a(Lcom/moji/lottie/BaseKeyframeAnimation$AnimationListener;)V
|
|
|
|
.line 39
|
|
iget-object p1, p0, Lcom/moji/lottie/FillContent;->f:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/lottie/BaseLayer;->a(Lcom/moji/lottie/BaseKeyframeAnimation;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
.line 27
|
|
iput-object p1, p0, Lcom/moji/lottie/FillContent;->e:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
.line 28
|
|
iput-object p1, p0, Lcom/moji/lottie/FillContent;->f:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 1
|
|
|
|
.line 44
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->g:Lcom/moji/lottie/LottieDrawable;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/lottie/LottieDrawable;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Landroid/graphics/Canvas;Landroid/graphics/Matrix;I)V
|
|
.locals 2
|
|
|
|
.line 70
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->b:Landroid/graphics/Paint;
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/FillContent;->e:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/lottie/KeyframeAnimation;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
int-to-float p3, p3
|
|
|
|
const/high16 v0, 0x437f0000 # 255.0f
|
|
|
|
div-float/2addr p3, v0
|
|
|
|
.line 71
|
|
iget-object v1, p0, Lcom/moji/lottie/FillContent;->f:Lcom/moji/lottie/KeyframeAnimation;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/lottie/KeyframeAnimation;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
mul-float p3, p3, v1
|
|
|
|
const/high16 v1, 0x42c80000 # 100.0f
|
|
|
|
div-float/2addr p3, v1
|
|
|
|
mul-float p3, p3, v0
|
|
|
|
float-to-int p3, p3
|
|
|
|
.line 72
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->b:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {v0, p3}, Landroid/graphics/Paint;->setAlpha(I)V
|
|
|
|
.line 74
|
|
iget-object p3, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
invoke-virtual {p3}, Landroid/graphics/Path;->reset()V
|
|
|
|
const/4 p3, 0x0
|
|
|
|
.line 75
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-ge p3, v0, :cond_0
|
|
|
|
.line 76
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/FillContent;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v1, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/lottie/PathContent;
|
|
|
|
invoke-interface {v1}, Lcom/moji/lottie/PathContent;->d()Landroid/graphics/Path;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1, p2}, Landroid/graphics/Path;->addPath(Landroid/graphics/Path;Landroid/graphics/Matrix;)V
|
|
|
|
add-int/lit8 p3, p3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 79
|
|
:cond_0
|
|
iget-object p2, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
iget-object p3, p0, Lcom/moji/lottie/FillContent;->b:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, p2, p3}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Landroid/graphics/RectF;Landroid/graphics/Matrix;)V
|
|
.locals 4
|
|
|
|
.line 84
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Path;->reset()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 85
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/moji/lottie/FillContent;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v1, v2, :cond_0
|
|
|
|
.line 86
|
|
iget-object v2, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
iget-object v3, p0, Lcom/moji/lottie/FillContent;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/moji/lottie/PathContent;
|
|
|
|
invoke-interface {v3}, Lcom/moji/lottie/PathContent;->d()Landroid/graphics/Path;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3, p2}, Landroid/graphics/Path;->addPath(Landroid/graphics/Path;Landroid/graphics/Matrix;)V
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 88
|
|
:cond_0
|
|
iget-object p2, p0, Lcom/moji/lottie/FillContent;->a:Landroid/graphics/Path;
|
|
|
|
invoke-virtual {p2, p1, v0}, Landroid/graphics/Path;->computeBounds(Landroid/graphics/RectF;Z)V
|
|
|
|
.line 90
|
|
iget p2, p1, Landroid/graphics/RectF;->left:F
|
|
|
|
const/high16 v0, 0x3f800000 # 1.0f
|
|
|
|
sub-float/2addr p2, v0
|
|
|
|
iget v1, p1, Landroid/graphics/RectF;->top:F
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
iget v2, p1, Landroid/graphics/RectF;->right:F
|
|
|
|
add-float/2addr v2, v0
|
|
|
|
iget v3, p1, Landroid/graphics/RectF;->bottom:F
|
|
|
|
add-float/2addr v3, v0
|
|
|
|
invoke-virtual {p1, p2, v1, v2, v3}, Landroid/graphics/RectF;->set(FFFF)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/ColorFilter;)V
|
|
.locals 0
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/graphics/ColorFilter;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 65
|
|
iget-object p1, p0, Lcom/moji/lottie/FillContent;->b:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, p3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Ljava/util/List;Ljava/util/List;)V
|
|
.locals 2
|
|
.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 p1, 0x0
|
|
|
|
.line 49
|
|
:goto_0
|
|
invoke-interface {p2}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-ge p1, v0, :cond_1
|
|
|
|
.line 50
|
|
invoke-interface {p2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/lottie/Content;
|
|
|
|
.line 51
|
|
instance-of v1, v0, Lcom/moji/lottie/PathContent;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 52
|
|
iget-object v1, p0, Lcom/moji/lottie/FillContent;->d:Ljava/util/List;
|
|
|
|
check-cast v0, Lcom/moji/lottie/PathContent;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_0
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public e()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 59
|
|
iget-object v0, p0, Lcom/moji/lottie/FillContent;->c:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|