修改测试问题,shouye ytuijian
This commit is contained in:
parent
b1b5be9976
commit
01d0def52d
@ -23,7 +23,7 @@ public class ClipPathCircleImage extends ImageView {
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.save();
|
||||
path.reset();
|
||||
path.addCircle(width / 2, height / 2, width / 2, Path.Direction.CCW);//CCW:逆时针,这里是一个简单的园,无影响
|
||||
path.addCircle(width / 2, height / 2, width / 2, Path.Direction.CW);//CCW:逆时针,这里是一个简单的园,无影响
|
||||
canvas.clipPath(path);
|
||||
super.onDraw(canvas);
|
||||
canvas.restore();
|
||||
|
@ -13,6 +13,7 @@
|
||||
<com.yunbao.common.views.weight.ClipPathCircleImage
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="55dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="55dp" />
|
||||
|
||||
<ImageView
|
||||
|
Loading…
Reference in New Issue
Block a user