android面试之怎么把图片变成圆形

1、思路

使用canvas画出一个圆形,把BitMap加载到canvas上面去。就得到了一个圆形的图片

canvas.drawBitMap();

2.

drawOval(RectF oval, Paint paint)//画椭圆,参数一是扫描区域,参数二为paint对象;

drawCircle(float cx, float cy, float radius,Paint paint)// 绘制圆,参数一是中心点的x轴,参数二是中心点的y轴,参数三是半径,参数四是paint对象;

原文地址:https://www.cnblogs.com/childhooding/p/4349216.html