2020-05-17 12:40:10 +00:00
|
|
|
.class public Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;
|
|
|
|
.super Landroid/graphics/drawable/shapes/OvalShape;
|
|
|
|
.source "CircleImageView.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Landroidx/swiperefreshlayout/widget/CircleImageView;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
2020-07-23 01:06:17 +00:00
|
|
|
accessFlags = 0x9
|
2020-05-17 12:40:10 +00:00
|
|
|
name = "OvalShadow"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2020-07-23 01:06:17 +00:00
|
|
|
.field public mCircleImageView:Landroidx/swiperefreshlayout/widget/CircleImageView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
.field public mShadowPaint:Landroid/graphics/Paint;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
.field public mShadowRadius:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroidx/swiperefreshlayout/widget/CircleImageView;I)V
|
2020-07-23 01:06:17 +00:00
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-direct {p0}, Landroid/graphics/drawable/shapes/OvalShape;-><init>()V
|
2020-07-20 19:00:44 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iput-object p1, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mCircleImageView:Landroidx/swiperefreshlayout/widget/CircleImageView;
|
|
|
|
|
|
|
|
new-instance p1, Landroid/graphics/Paint;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iput-object p1, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mShadowPaint:Landroid/graphics/Paint;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iput p2, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mShadowRadius:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/graphics/drawable/shapes/OvalShape;->rect()Landroid/graphics/RectF;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/RectF;->width()F
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
float-to-int p1, p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->updateRadialGradient(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private updateRadialGradient(I)V
|
2020-07-23 01:06:17 +00:00
|
|
|
.locals 9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v0, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mShadowPaint:Landroid/graphics/Paint;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
new-instance v8, Landroid/graphics/RadialGradient;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
const/4 v1, 0x2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
div-int/2addr p1, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
int-to-float v3, p1
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget p1, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mShadowRadius:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
int-to-float v4, p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
new-array v5, v1, [I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
fill-array-data v5, :array_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
sget-object v7, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
move-object v1, v8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
move v2, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-direct/range {v1 .. v7}, Landroid/graphics/RadialGradient;-><init>(FFF[I[FLandroid/graphics/Shader$TileMode;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {v0, v8}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:array_0
|
|
|
|
.array-data 4
|
|
|
|
0x3d000000 # 0.03125f
|
|
|
|
0x0
|
|
|
|
.end array-data
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public draw(Landroid/graphics/Canvas;Landroid/graphics/Paint;)V
|
|
|
|
.locals 4
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v0, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mCircleImageView:Landroidx/swiperefreshlayout/widget/CircleImageView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/widget/ImageView;->getWidth()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
div-int/lit8 v0, v0, 0x2
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mCircleImageView:Landroidx/swiperefreshlayout/widget/CircleImageView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroid/widget/ImageView;->getHeight()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
div-int/lit8 v1, v1, 0x2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
int-to-float v2, v0
|
|
|
|
|
|
|
|
int-to-float v1, v1
|
|
|
|
|
|
|
|
iget-object v3, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mShadowPaint:Landroid/graphics/Paint;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2, v1, v2, v3}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget v3, p0, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->mShadowRadius:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sub-int/2addr v0, v3
|
|
|
|
|
|
|
|
int-to-float v0, v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2, v1, v0, p2}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onResize(FF)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-super {p0, p1, p2}, Landroid/graphics/drawable/shapes/OvalShape;->onResize(FF)V
|
|
|
|
|
|
|
|
float-to-int p1, p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Landroidx/swiperefreshlayout/widget/CircleImageView$OvalShadow;->updateRadialGradient(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|