MakeupImageView.java
1.46 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
package com.bitstrips.imoji.abv3.option;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Path.Direction;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
public class MakeupImageView
extends AppCompatImageView
{
boolean a = true;
final Path b = new Path();
public MakeupImageView(Context paramContext)
{
super(paramContext);
}
public MakeupImageView(Context paramContext, @Nullable AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
protected void onDraw(Canvas paramCanvas)
{
int i = paramCanvas.getWidth();
int j = paramCanvas.getHeight();
paramCanvas.save();
RectF localRectF = new RectF(0.0F, 0.0F, i, j);
float f2 = i / 2.0F;
float f1 = j / 2.0F;
if (!this.a)
{
f2 = i / 4.0F;
f1 = j / 4.0F;
}
this.b.addRoundRect(localRectF, f2, f1, Path.Direction.CW);
paramCanvas.clipPath(this.b);
paramCanvas.drawColor(-1);
super.onDraw(paramCanvas);
paramCanvas.restore();
}
public void setCircle()
{
this.a = true;
}
public void setSquare()
{
this.a = false;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/option/MakeupImageView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/