d.java
3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.Drawable;
import android.support.v4.graphics.ColorUtils;
class d
extends Drawable
{
final Paint a = new Paint(1);
final Rect b = new Rect();
final RectF c = new RectF();
float d;
int e;
int f;
int g;
int h;
boolean i = true;
float j;
private ColorStateList k;
private int l;
public d()
{
this.a.setStyle(Paint.Style.STROKE);
}
final void a(ColorStateList paramColorStateList)
{
if (paramColorStateList != null) {
this.l = paramColorStateList.getColorForState(getState(), this.l);
}
this.k = paramColorStateList;
this.i = true;
invalidateSelf();
}
public void draw(Canvas paramCanvas)
{
if (this.i)
{
localObject1 = this.a;
Object localObject2 = this.b;
copyBounds((Rect)localObject2);
f1 = this.d / ((Rect)localObject2).height();
int m = ColorUtils.compositeColors(this.e, this.l);
int n = ColorUtils.compositeColors(this.f, this.l);
int i1 = ColorUtils.compositeColors(ColorUtils.setAlphaComponent(this.f, 0), this.l);
int i2 = ColorUtils.compositeColors(ColorUtils.setAlphaComponent(this.h, 0), this.l);
int i3 = ColorUtils.compositeColors(this.h, this.l);
int i4 = ColorUtils.compositeColors(this.g, this.l);
float f2 = ((Rect)localObject2).top;
float f3 = ((Rect)localObject2).bottom;
localObject2 = Shader.TileMode.CLAMP;
((Paint)localObject1).setShader(new LinearGradient(0.0F, f2, 0.0F, f3, new int[] { m, n, i1, i2, i3, i4 }, new float[] { 0.0F, f1, 0.5F, 0.5F, 1.0F - f1, 1.0F }, (Shader.TileMode)localObject2));
this.i = false;
}
float f1 = this.a.getStrokeWidth() / 2.0F;
Object localObject1 = this.c;
copyBounds(this.b);
((RectF)localObject1).set(this.b);
((RectF)localObject1).left += f1;
((RectF)localObject1).top += f1;
((RectF)localObject1).right -= f1;
((RectF)localObject1).bottom -= f1;
paramCanvas.save();
paramCanvas.rotate(this.j, ((RectF)localObject1).centerX(), ((RectF)localObject1).centerY());
paramCanvas.drawOval((RectF)localObject1, this.a);
paramCanvas.restore();
}
public int getOpacity()
{
if (this.d > 0.0F) {
return -3;
}
return -2;
}
public boolean getPadding(Rect paramRect)
{
int m = Math.round(this.d);
paramRect.set(m, m, m, m);
return true;
}
public boolean isStateful()
{
return ((this.k != null) && (this.k.isStateful())) || (super.isStateful());
}
protected void onBoundsChange(Rect paramRect)
{
this.i = true;
}
protected boolean onStateChange(int[] paramArrayOfInt)
{
if (this.k != null)
{
int m = this.k.getColorForState(paramArrayOfInt, this.l);
if (m != this.l)
{
this.i = true;
this.l = m;
}
}
if (this.i) {
invalidateSelf();
}
return this.i;
}
public void setAlpha(int paramInt)
{
this.a.setAlpha(paramInt);
invalidateSelf();
}
public void setColorFilter(ColorFilter paramColorFilter)
{
this.a.setColorFilter(paramColorFilter);
invalidateSelf();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/d.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/