g.smali
.class public final Lcom/opensource/svgaplayer/entities/g;
.super Ljava/lang/Object;
.source "SVGAVideoSpriteFrameEntity.kt"
# instance fields
.field private a:D
.field private b:Lcom/opensource/svgaplayer/b/c;
.field private c:Landroid/graphics/Matrix;
.field private d:Lcom/opensource/svgaplayer/entities/b;
.field private e:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lcom/opensource/svgaplayer/proto/FrameEntity;)V
.registers 14
const-string v0, "obj"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 26
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 27
new-instance v0, Lcom/opensource/svgaplayer/b/c;
const-wide/16 v2, 0x0
const-wide/16 v4, 0x0
const-wide/16 v6, 0x0
const-wide/16 v8, 0x0
move-object v1, v0
invoke-direct/range {v1 .. v9}, Lcom/opensource/svgaplayer/b/c;-><init>(DDDD)V
iput-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->b:Lcom/opensource/svgaplayer/b/c;
.line 28
new-instance v0, Landroid/graphics/Matrix;
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
iput-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->c:Landroid/graphics/Matrix;
.line 29
invoke-static {}, Lkotlin/collections/l;->a()Ljava/util/List;
move-result-object v0
iput-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->e:Ljava/util/List;
.line 30
iget-object v0, p1, Lcom/opensource/svgaplayer/proto/FrameEntity;->alpha:Ljava/lang/Float;
const/4 v1, 0x0
if-eqz v0, :cond_2f
invoke-virtual {v0}, Ljava/lang/Float;->floatValue()F
move-result v0
goto :goto_30
:cond_2f
const/4 v0, 0x0
:goto_30
float-to-double v2, v0
iput-wide v2, p0, Lcom/opensource/svgaplayer/entities/g;->a:D
.line 31
iget-object v0, p1, Lcom/opensource/svgaplayer/proto/FrameEntity;->layout:Lcom/opensource/svgaplayer/proto/Layout;
if-eqz v0, :cond_6b
.line 32
new-instance v11, Lcom/opensource/svgaplayer/b/c;
iget-object v2, v0, Lcom/opensource/svgaplayer/proto/Layout;->x:Ljava/lang/Float;
if-eqz v2, :cond_42
invoke-virtual {v2}, Ljava/lang/Float;->floatValue()F
move-result v2
goto :goto_43
:cond_42
const/4 v2, 0x0
:goto_43
float-to-double v3, v2
iget-object v2, v0, Lcom/opensource/svgaplayer/proto/Layout;->y:Ljava/lang/Float;
if-eqz v2, :cond_4d
invoke-virtual {v2}, Ljava/lang/Float;->floatValue()F
move-result v2
goto :goto_4e
:cond_4d
const/4 v2, 0x0
:goto_4e
float-to-double v5, v2
.line 33
iget-object v2, v0, Lcom/opensource/svgaplayer/proto/Layout;->width:Ljava/lang/Float;
if-eqz v2, :cond_58
invoke-virtual {v2}, Ljava/lang/Float;->floatValue()F
move-result v2
goto :goto_59
:cond_58
const/4 v2, 0x0
:goto_59
float-to-double v7, v2
iget-object v0, v0, Lcom/opensource/svgaplayer/proto/Layout;->height:Ljava/lang/Float;
if-eqz v0, :cond_63
invoke-virtual {v0}, Ljava/lang/Float;->floatValue()F
move-result v0
goto :goto_64
:cond_63
const/4 v0, 0x0
:goto_64
float-to-double v9, v0
move-object v2, v11
.line 34
invoke-direct/range {v2 .. v10}, Lcom/opensource/svgaplayer/b/c;-><init>(DDDD)V
iput-object v11, p0, Lcom/opensource/svgaplayer/entities/g;->b:Lcom/opensource/svgaplayer/b/c;
.line 35
:cond_6b
iget-object v0, p1, Lcom/opensource/svgaplayer/proto/FrameEntity;->transform:Lcom/opensource/svgaplayer/proto/Transform;
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v0, :cond_d4
const/16 v4, 0x9
.line 36
new-array v4, v4, [F
.line 37
iget-object v5, v0, Lcom/opensource/svgaplayer/proto/Transform;->a:Ljava/lang/Float;
const/high16 v6, 0x3f800000 # 1.0f
if-eqz v5, :cond_80
invoke-virtual {v5}, Ljava/lang/Float;->floatValue()F
move-result v5
goto :goto_82
:cond_80
const/high16 v5, 0x3f800000 # 1.0f
.line 38
:goto_82
iget-object v7, v0, Lcom/opensource/svgaplayer/proto/Transform;->b:Ljava/lang/Float;
if-eqz v7, :cond_8b
invoke-virtual {v7}, Ljava/lang/Float;->floatValue()F
move-result v7
goto :goto_8c
:cond_8b
const/4 v7, 0x0
.line 39
:goto_8c
iget-object v8, v0, Lcom/opensource/svgaplayer/proto/Transform;->c:Ljava/lang/Float;
if-eqz v8, :cond_95
invoke-virtual {v8}, Ljava/lang/Float;->floatValue()F
move-result v8
goto :goto_96
:cond_95
const/4 v8, 0x0
.line 40
:goto_96
iget-object v9, v0, Lcom/opensource/svgaplayer/proto/Transform;->d:Ljava/lang/Float;
if-eqz v9, :cond_9f
invoke-virtual {v9}, Ljava/lang/Float;->floatValue()F
move-result v9
goto :goto_a1
:cond_9f
const/high16 v9, 0x3f800000 # 1.0f
.line 41
:goto_a1
iget-object v10, v0, Lcom/opensource/svgaplayer/proto/Transform;->tx:Ljava/lang/Float;
if-eqz v10, :cond_aa
invoke-virtual {v10}, Ljava/lang/Float;->floatValue()F
move-result v10
goto :goto_ab
:cond_aa
const/4 v10, 0x0
.line 42
:goto_ab
iget-object v0, v0, Lcom/opensource/svgaplayer/proto/Transform;->ty:Ljava/lang/Float;
if-eqz v0, :cond_b4
invoke-virtual {v0}, Ljava/lang/Float;->floatValue()F
move-result v0
goto :goto_b5
:cond_b4
const/4 v0, 0x0
:goto_b5
aput v5, v4, v3
aput v8, v4, v2
const/4 v5, 0x2
aput v10, v4, v5
const/4 v5, 0x3
aput v7, v4, v5
const/4 v5, 0x4
aput v9, v4, v5
const/4 v5, 0x5
aput v0, v4, v5
const/4 v0, 0x6
aput v1, v4, v0
const/4 v0, 0x7
aput v1, v4, v0
const/16 v0, 0x8
aput v6, v4, v0
.line 43
iget-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->c:Landroid/graphics/Matrix;
invoke-virtual {v0, v4}, Landroid/graphics/Matrix;->setValues([F)V
.line 44
:cond_d4
iget-object v0, p1, Lcom/opensource/svgaplayer/proto/FrameEntity;->clipPath:Ljava/lang/String;
if-eqz v0, :cond_ed
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v1
if-lez v1, :cond_df
goto :goto_e0
:cond_df
const/4 v2, 0x0
:goto_e0
if-eqz v2, :cond_e3
goto :goto_e4
:cond_e3
const/4 v0, 0x0
:goto_e4
if-eqz v0, :cond_ed
.line 45
new-instance v1, Lcom/opensource/svgaplayer/entities/b;
invoke-direct {v1, v0}, Lcom/opensource/svgaplayer/entities/b;-><init>(Ljava/lang/String;)V
iput-object v1, p0, Lcom/opensource/svgaplayer/entities/g;->d:Lcom/opensource/svgaplayer/entities/b;
.line 46
:cond_ed
iget-object p1, p1, Lcom/opensource/svgaplayer/proto/FrameEntity;->shapes:Ljava/util/List;
const-string v0, "obj.shapes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->a(Ljava/lang/Object;Ljava/lang/String;)V
.line 47
new-instance v0, Ljava/util/ArrayList;
const/16 v1, 0xa
invoke-static {p1, v1}, Lkotlin/collections/l;->a(Ljava/lang/Iterable;I)I
move-result v1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
.line 48
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_103
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_11d
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
.line 49
check-cast v1, Lcom/opensource/svgaplayer/proto/ShapeEntity;
.line 50
new-instance v2, Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;
const-string v3, "it"
invoke-static {v1, v3}, Lkotlin/jvm/internal/i;->a(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {v2, v1}, Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;-><init>(Lcom/opensource/svgaplayer/proto/ShapeEntity;)V
invoke-interface {v0, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_103
.line 51
:cond_11d
iput-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->e:Ljava/util/List;
return-void
.end method
.method public constructor <init>(Lorg/json/JSONObject;)V
.registers 20
move-object/from16 v0, p0
move-object/from16 v1, p1
const-string v2, "obj"
invoke-static {v1, v2}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v2, Lcom/opensource/svgaplayer/b/c;
const-wide/16 v4, 0x0
const-wide/16 v6, 0x0
const-wide/16 v8, 0x0
const-wide/16 v10, 0x0
move-object v3, v2
invoke-direct/range {v3 .. v11}, Lcom/opensource/svgaplayer/b/c;-><init>(DDDD)V
iput-object v2, v0, Lcom/opensource/svgaplayer/entities/g;->b:Lcom/opensource/svgaplayer/b/c;
.line 3
new-instance v2, Landroid/graphics/Matrix;
invoke-direct {v2}, Landroid/graphics/Matrix;-><init>()V
iput-object v2, v0, Lcom/opensource/svgaplayer/entities/g;->c:Landroid/graphics/Matrix;
.line 4
invoke-static {}, Lkotlin/collections/l;->a()Ljava/util/List;
move-result-object v2
iput-object v2, v0, Lcom/opensource/svgaplayer/entities/g;->e:Ljava/util/List;
const-wide/16 v2, 0x0
const-string v4, "alpha"
.line 5
invoke-virtual {v1, v4, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v4
iput-wide v4, v0, Lcom/opensource/svgaplayer/entities/g;->a:D
const-string v4, "layout"
.line 6
invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v4
if-eqz v4, :cond_5b
.line 7
new-instance v14, Lcom/opensource/svgaplayer/b/c;
const-string v5, "x"
invoke-virtual {v4, v5, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v6
const-string v5, "y"
invoke-virtual {v4, v5, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v8
const-string v5, "width"
invoke-virtual {v4, v5, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v10
const-string v5, "height"
invoke-virtual {v4, v5, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v12
move-object v5, v14
invoke-direct/range {v5 .. v13}, Lcom/opensource/svgaplayer/b/c;-><init>(DDDD)V
iput-object v14, v0, Lcom/opensource/svgaplayer/entities/g;->b:Lcom/opensource/svgaplayer/b/c;
:cond_5b
const-string v4, "transform"
.line 8
invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v4
if-eqz v4, :cond_be
const/16 v7, 0x9
.line 9
new-array v7, v7, [F
const-wide/high16 v8, 0x3ff0000000000000L # 1.0
const-string v10, "a"
.line 10
invoke-virtual {v4, v10, v8, v9}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v10
const-string v12, "b"
.line 11
invoke-virtual {v4, v12, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v12
const-string v14, "c"
.line 12
invoke-virtual {v4, v14, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v14
const-string v5, "d"
move-object/from16 v17, v7
.line 13
invoke-virtual {v4, v5, v8, v9}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v6
const-string v5, "tx"
.line 14
invoke-virtual {v4, v5, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v8
const-string v5, "ty"
.line 15
invoke-virtual {v4, v5, v2, v3}, Lorg/json/JSONObject;->optDouble(Ljava/lang/String;D)D
move-result-wide v4
double-to-float v10, v10
const/4 v11, 0x0
aput v10, v17, v11
double-to-float v10, v14
const/16 v16, 0x1
aput v10, v17, v16
const/4 v10, 0x2
double-to-float v8, v8
aput v8, v17, v10
const/4 v8, 0x3
double-to-float v9, v12
aput v9, v17, v8
const/4 v8, 0x4
double-to-float v6, v6
aput v6, v17, v8
const/4 v6, 0x5
double-to-float v4, v4
aput v4, v17, v6
const/4 v4, 0x6
double-to-float v2, v2
aput v2, v17, v4
const/4 v3, 0x7
aput v2, v17, v3
const/16 v2, 0x8
const-wide/high16 v3, 0x3ff0000000000000L # 1.0
double-to-float v3, v3
aput v3, v17, v2
.line 16
iget-object v2, v0, Lcom/opensource/svgaplayer/entities/g;->c:Landroid/graphics/Matrix;
move-object/from16 v3, v17
invoke-virtual {v2, v3}, Landroid/graphics/Matrix;->setValues([F)V
goto :goto_c1
:cond_be
const/4 v11, 0x0
const/16 v16, 0x1
:goto_c1
const-string v2, "clipPath"
.line 17
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_db
.line 18
invoke-interface {v2}, Ljava/lang/CharSequence;->length()I
move-result v3
if-lez v3, :cond_d0
goto :goto_d2
:cond_d0
const/16 v16, 0x0
:goto_d2
if-eqz v16, :cond_db
.line 19
new-instance v3, Lcom/opensource/svgaplayer/entities/b;
invoke-direct {v3, v2}, Lcom/opensource/svgaplayer/entities/b;-><init>(Ljava/lang/String;)V
iput-object v3, v0, Lcom/opensource/svgaplayer/entities/g;->d:Lcom/opensource/svgaplayer/entities/b;
:cond_db
const-string v2, "shapes"
.line 20
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
move-result-object v1
if-eqz v1, :cond_105
.line 21
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
.line 22
invoke-virtual {v1}, Lorg/json/JSONArray;->length()I
move-result v3
:goto_ec
if-ge v11, v3, :cond_ff
.line 23
invoke-virtual {v1, v11}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;
move-result-object v4
if-eqz v4, :cond_fc
.line 24
new-instance v5, Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;
invoke-direct {v5, v4}, Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;-><init>(Lorg/json/JSONObject;)V
invoke-interface {v2, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:cond_fc
add-int/lit8 v11, v11, 0x1
goto :goto_ec
.line 25
:cond_ff
invoke-static {v2}, Lkotlin/collections/l;->f(Ljava/lang/Iterable;)Ljava/util/List;
move-result-object v1
iput-object v1, v0, Lcom/opensource/svgaplayer/entities/g;->e:Ljava/util/List;
:cond_105
return-void
.end method
# virtual methods
.method public final a()D
.registers 3
.line 1
iget-wide v0, p0, Lcom/opensource/svgaplayer/entities/g;->a:D
return-wide v0
.end method
.method public final a(Ljava/util/List;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;",
">;)V"
}
.end annotation
const-string v0, "<set-?>"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 2
iput-object p1, p0, Lcom/opensource/svgaplayer/entities/g;->e:Ljava/util/List;
return-void
.end method
.method public final b()Lcom/opensource/svgaplayer/b/c;
.registers 2
.line 1
iget-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->b:Lcom/opensource/svgaplayer/b/c;
return-object v0
.end method
.method public final c()Lcom/opensource/svgaplayer/entities/b;
.registers 2
.line 1
iget-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->d:Lcom/opensource/svgaplayer/entities/b;
return-object v0
.end method
.method public final d()Ljava/util/List;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/opensource/svgaplayer/entities/SVGAVideoShapeEntity;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->e:Ljava/util/List;
return-object v0
.end method
.method public final e()Landroid/graphics/Matrix;
.registers 2
.line 1
iget-object v0, p0, Lcom/opensource/svgaplayer/entities/g;->c:Landroid/graphics/Matrix;
return-object v0
.end method