AvatarOptionEyeView.java
2.78 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
package com.bitstrips.imoji.abv3.option;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.graphics.Path.Direction;
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.AttributeSet;
public class AvatarOptionEyeView
extends AvatarBuilderOptionView
{
private int a;
private boolean b;
public AvatarOptionEyeView(Context paramContext)
{
super(paramContext);
}
public AvatarOptionEyeView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
protected void dispatchDraw(Canvas paramCanvas)
{
drawEyeColor(paramCanvas, paramCanvas.getClipBounds());
super.dispatchDraw(paramCanvas);
}
public void drawEyeColor(Canvas paramCanvas, Rect paramRect)
{
Paint localPaint = a.a();
int i = Color.argb(25, 0, 0, 0);
float f1 = paramRect.width();
Path localPath = a.b();
localPath.reset();
localPath.addOval(new RectF(0.0F, 0.0F, f1, f1), Path.Direction.CW);
localPaint.reset();
localPaint.setFlags(1);
localPaint.setStyle(Paint.Style.FILL);
localPaint.setColor(this.a);
paramCanvas.drawPath(localPath, localPaint);
float f2 = paramRect.width() / 16;
float f3 = f2 / 2.0F;
localPath = a.c();
localPath.reset();
localPath.addOval(new RectF(f3, f3, f1 - f3, f1 - f3), Path.Direction.CW);
localPaint.reset();
localPaint.setFlags(1);
localPaint.setStrokeWidth(f2);
localPaint.setStrokeCap(Paint.Cap.ROUND);
localPaint.setStrokeMiter(10.0F);
localPaint.setStyle(Paint.Style.STROKE);
localPaint.setColor(i);
paramCanvas.drawPath(localPath, localPaint);
if (this.b)
{
f2 = paramRect.width() / 2.5F;
f1 = (f1 - f2) / 2.0F;
paramRect = a.d();
paramRect.reset();
paramRect.addOval(new RectF(f1, f1, f2 + f1, f2 + f1), Path.Direction.CW);
localPaint.reset();
localPaint.setFlags(1);
localPaint.setStyle(Paint.Style.FILL);
localPaint.setColor(-16777216);
paramCanvas.drawPath(paramRect, localPaint);
}
}
public void setIrisColor(int paramInt)
{
this.a = paramInt;
invalidate();
}
public void setPupilVisible(boolean paramBoolean)
{
this.b = paramBoolean;
}
static final class a
{
private static Paint a = new Paint();
private static Path b = new Path();
private static Path c = new Path();
private static Path d = new Path();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/option/AvatarOptionEyeView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/