效果
几个要点:
1. 坐标系以左上角为原点,横X竖Y
2. 笔刷Paint
Paint paint = new Paint();
//设置画笔颜色
paint.setColor(getResources().getColor(R.color.arc_fail_color));
//设置画笔的宽度
paint.setStrokeWidth(lineThick);
//设置图形为空心
paint.setStyle(Paint.Style.STROKE);
//消除锯齿
paint.setAntiAlias(true);
3. 绘制直线
/** Canvas
* Draw a line segment with the specified start and stop x,y coordinates,
* using the specified paint.
*
* @param startX The x-coordinate of the start point of the line
* @param startY The y-coordinate of the start point of the line
* @param paint The paint used to dra