2019-07-24 11:27:29 +00:00
|
|
|
.class public Landroidx/core/graphics/PathParser;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "PathParser.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Landroidx/core/graphics/PathParser$PathDataNode;,
|
|
|
|
Landroidx/core/graphics/PathParser$ExtractFloatResult;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final LOGTAG:Ljava/lang/String; = "PathParser"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public constructor <init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static addNode(Ljava/util/ArrayList;C[F)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/ArrayList<",
|
|
|
|
"Landroidx/core/graphics/PathParser$PathDataNode;",
|
|
|
|
">;C[F)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1, p2}, Landroidx/core/graphics/PathParser$PathDataNode;-><init>(C[F)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static canMorph([Landroidx/core/graphics/PathParser$PathDataNode;[Landroidx/core/graphics/PathParser$PathDataNode;)Z
|
|
|
|
.locals 4
|
2019-12-06 03:29:40 +00:00
|
|
|
.param p0 # [Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # [Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
array-length v1, p0
|
|
|
|
|
|
|
|
array-length v2, p1
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
array-length v2, p0
|
|
|
|
|
|
|
|
if-ge v1, v2, :cond_4
|
|
|
|
|
|
|
|
aget-object v2, p0, v1
|
|
|
|
|
|
|
|
iget-char v2, v2, Landroidx/core/graphics/PathParser$PathDataNode;->mType:C
|
|
|
|
|
|
|
|
aget-object v3, p1, v1
|
|
|
|
|
|
|
|
iget-char v3, v3, Landroidx/core/graphics/PathParser$PathDataNode;->mType:C
|
|
|
|
|
|
|
|
if-ne v2, v3, :cond_3
|
|
|
|
|
|
|
|
aget-object v2, p0, v1
|
|
|
|
|
|
|
|
iget-object v2, v2, Landroidx/core/graphics/PathParser$PathDataNode;->mParams:[F
|
|
|
|
|
|
|
|
array-length v2, v2
|
|
|
|
|
|
|
|
aget-object v3, p1, v1
|
|
|
|
|
|
|
|
iget-object v3, v3, Landroidx/core/graphics/PathParser$PathDataNode;->mParams:[F
|
|
|
|
|
|
|
|
array-length v3, v3
|
|
|
|
|
|
|
|
if-eq v2, v3, :cond_2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_1
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:goto_2
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static copyOfRange([FII)[F
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
if-gt p1, p2, :cond_1
|
|
|
|
|
|
|
|
array-length v0, p0
|
|
|
|
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
|
|
|
|
if-gt p1, v0, :cond_0
|
|
|
|
|
|
|
|
sub-int/2addr p2, p1
|
|
|
|
|
|
|
|
sub-int/2addr v0, p1
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Ljava/lang/Math;->min(II)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
new-array p2, p2, [F
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-static {p0, p1, p2, v1, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
|
|
|
|
return-object p2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/lang/ArrayIndexOutOfBoundsException;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>()V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static createNodesFromPathData(Ljava/lang/String;)[Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-ge v3, v5, :cond_2
|
|
|
|
|
|
|
|
invoke-static {p0, v3}, Landroidx/core/graphics/PathParser;->nextStart(Ljava/lang/String;I)I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
invoke-virtual {p0, v4, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-lez v5, :cond_1
|
|
|
|
|
|
|
|
invoke-static {v4}, Landroidx/core/graphics/PathParser;->getFloats(Ljava/lang/String;)[F
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v2}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
invoke-static {v0, v4, v5}, Landroidx/core/graphics/PathParser;->addNode(Ljava/util/ArrayList;C[F)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
add-int/lit8 v4, v3, 0x1
|
|
|
|
|
|
|
|
move v6, v4
|
|
|
|
|
|
|
|
move v4, v3
|
|
|
|
|
|
|
|
move v3, v6
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sub-int/2addr v3, v4
|
|
|
|
|
|
|
|
if-ne v3, v1, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-ge v4, v1, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {p0, v4}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
new-array v1, v2, [F
|
|
|
|
|
|
|
|
invoke-static {v0, p0, v1}, Landroidx/core/graphics/PathParser;->addNode(Ljava/util/ArrayList;C[F)V
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
new-array p0, p0, [Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, [Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static createPathFromPathData(Ljava/lang/String;)Landroid/graphics/Path;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Landroid/graphics/Path;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Path;-><init>()V
|
|
|
|
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/PathParser;->createNodesFromPathData(Ljava/lang/String;)[Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-static {v1, v0}, Landroidx/core/graphics/PathParser$PathDataNode;->nodesToPath([Landroidx/core/graphics/PathParser$PathDataNode;Landroid/graphics/Path;)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
new-instance v1, Ljava/lang/RuntimeException;
|
|
|
|
|
|
|
|
const-string v2, "Error in parsing "
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v2, p0}, Le/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static deepCopyNodes([Landroidx/core/graphics/PathParser$PathDataNode;)[Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
array-length v0, p0
|
|
|
|
|
|
|
|
new-array v0, v0, [Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
array-length v2, p0
|
|
|
|
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
|
|
|
|
new-instance v2, Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
|
|
|
|
aget-object v3, p0, v1
|
|
|
|
|
|
|
|
invoke-direct {v2, v3}, Landroidx/core/graphics/PathParser$PathDataNode;-><init>(Landroidx/core/graphics/PathParser$PathDataNode;)V
|
|
|
|
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static extract(Ljava/lang/String;ILandroidx/core/graphics/PathParser$ExtractFloatResult;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 8
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p2, Landroidx/core/graphics/PathParser$ExtractFloatResult;->mEndWithNegOrDot:Z
|
|
|
|
|
|
|
|
move v1, p1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-ge v1, v5, :cond_5
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
const/16 v6, 0x20
|
|
|
|
|
|
|
|
const/4 v7, 0x1
|
|
|
|
|
|
|
|
if-eq v5, v6, :cond_3
|
|
|
|
|
|
|
|
const/16 v6, 0x45
|
|
|
|
|
|
|
|
if-eq v5, v6, :cond_2
|
|
|
|
|
|
|
|
const/16 v6, 0x65
|
|
|
|
|
|
|
|
if-eq v5, v6, :cond_2
|
|
|
|
|
|
|
|
packed-switch v5, :pswitch_data_0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:pswitch_0
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iput-boolean v7, p2, Landroidx/core/graphics/PathParser$ExtractFloatResult;->mEndWithNegOrDot:Z
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:pswitch_1
|
|
|
|
if-eq v1, p1, :cond_1
|
|
|
|
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
|
|
|
|
iput-boolean v7, p2, Landroidx/core/graphics/PathParser$ExtractFloatResult;->mEndWithNegOrDot:Z
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_2
|
|
|
|
:pswitch_2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
:goto_3
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v4, :cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_5
|
|
|
|
:goto_4
|
2019-07-24 11:27:29 +00:00
|
|
|
iput v1, p2, Landroidx/core/graphics/PathParser$ExtractFloatResult;->mEndPosition:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:pswitch_data_0
|
|
|
|
.packed-switch 0x2c
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_1
|
|
|
|
:pswitch_0
|
|
|
|
.end packed-switch
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static getFloats(Ljava/lang/String;)[F
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 8
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/16 v2, 0x7a
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/16 v2, 0x5a
|
|
|
|
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
new-array v1, v1, [F
|
|
|
|
|
|
|
|
new-instance v2, Landroidx/core/graphics/PathParser$ExtractFloatResult;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Landroidx/core/graphics/PathParser$ExtractFloatResult;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v4, v3, :cond_3
|
|
|
|
|
|
|
|
invoke-static {p0, v4, v2}, Landroidx/core/graphics/PathParser;->extract(Ljava/lang/String;ILandroidx/core/graphics/PathParser$ExtractFloatResult;)V
|
|
|
|
|
|
|
|
iget v6, v2, Landroidx/core/graphics/PathParser$ExtractFloatResult;->mEndPosition:I
|
|
|
|
|
|
|
|
if-ge v4, v6, :cond_1
|
|
|
|
|
|
|
|
add-int/lit8 v7, v5, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {p0, v4, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-static {v4}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
aput v4, v1, v5
|
|
|
|
|
|
|
|
move v5, v7
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-boolean v4, v2, Landroidx/core/graphics/PathParser$ExtractFloatResult;->mEndWithNegOrDot:Z
|
|
|
|
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
|
|
|
|
move v4, v6
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
add-int/lit8 v4, v6, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-static {v1, v0, v5}, Landroidx/core/graphics/PathParser;->copyOfRange([FII)[F
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
new-instance v1, Ljava/lang/RuntimeException;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const-string v2, "error in parsing \""
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const-string v3, "\""
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v2, p0, v3}, Le/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
:goto_1
|
|
|
|
new-array p0, v0, [F
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
.method public static interpolatePathDataNodes([Landroidx/core/graphics/PathParser$PathDataNode;[Landroidx/core/graphics/PathParser$PathDataNode;[Landroidx/core/graphics/PathParser$PathDataNode;F)Z
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
|
|
|
array-length v0, p0
|
|
|
|
|
|
|
|
array-length v1, p1
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
|
|
|
|
array-length v0, p1
|
|
|
|
|
|
|
|
array-length v1, p2
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Landroidx/core/graphics/PathParser;->canMorph([Landroidx/core/graphics/PathParser$PathDataNode;[Landroidx/core/graphics/PathParser$PathDataNode;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
array-length v0, p0
|
|
|
|
|
|
|
|
if-ge v1, v0, :cond_1
|
|
|
|
|
|
|
|
aget-object v0, p0, v1
|
|
|
|
|
|
|
|
aget-object v2, p1, v1
|
|
|
|
|
|
|
|
aget-object v3, p2, v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, v3, p3}, Landroidx/core/graphics/PathParser$PathDataNode;->interpolatePathDataNode(Landroidx/core/graphics/PathParser$PathDataNode;Landroidx/core/graphics/PathParser$PathDataNode;F)V
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "The nodes to be interpolated and resulting nodes must have the same length"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "The nodes to be interpolated and resulting nodes cannot be null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static nextStart(Ljava/lang/String;I)I
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-ge p1, v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
add-int/lit8 v1, v0, -0x41
|
|
|
|
|
|
|
|
add-int/lit8 v2, v0, -0x5a
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
mul-int v2, v2, v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-lez v2, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
add-int/lit8 v1, v0, -0x61
|
|
|
|
|
|
|
|
add-int/lit8 v2, v0, -0x7a
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
mul-int v2, v2, v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-gtz v2, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/16 v1, 0x65
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
|
|
|
|
const/16 v1, 0x45
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static updateNodes([Landroidx/core/graphics/PathParser$PathDataNode;[Landroidx/core/graphics/PathParser$PathDataNode;)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
array-length v2, p1
|
|
|
|
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
|
|
|
|
aget-object v2, p0, v1
|
|
|
|
|
|
|
|
aget-object v3, p1, v1
|
|
|
|
|
|
|
|
iget-char v3, v3, Landroidx/core/graphics/PathParser$PathDataNode;->mType:C
|
|
|
|
|
|
|
|
iput-char v3, v2, Landroidx/core/graphics/PathParser$PathDataNode;->mType:C
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
aget-object v3, p1, v1
|
|
|
|
|
|
|
|
iget-object v3, v3, Landroidx/core/graphics/PathParser$PathDataNode;->mParams:[F
|
|
|
|
|
|
|
|
array-length v3, v3
|
|
|
|
|
|
|
|
if-ge v2, v3, :cond_0
|
|
|
|
|
|
|
|
aget-object v3, p0, v1
|
|
|
|
|
|
|
|
iget-object v3, v3, Landroidx/core/graphics/PathParser$PathDataNode;->mParams:[F
|
|
|
|
|
|
|
|
aget-object v4, p1, v1
|
|
|
|
|
|
|
|
iget-object v4, v4, Landroidx/core/graphics/PathParser$PathDataNode;->mParams:[F
|
|
|
|
|
|
|
|
aget v4, v4, v2
|
|
|
|
|
|
|
|
aput v4, v3, v2
|
|
|
|
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|