android canvas.draw 注意

来源:互联网 发布:儿童文学知乎 编辑:程序博客网 时间:2024/06/08 00:09

注意

  1. drawCircle(float cx, float cy, float radius, @NonNull Paint paint) 前两个是中心位置,radius是半径
    paint需要注意:setStrokeWidth(float width)是指边框的长度(使用的时候注意是否需要除以2),如果是画一个圆环,先画一个圆,radius1 = radius,再画一个空心圆,radius2 = radius + width / 2
    圆环
0 0