线交角:Paint.Join.
:[#BEVEL
|ROUND
|MITER
]
注意:只有路径绘制的线才有交角效果
/**
* 角型测试:Paint.Join.BEVEL、Paint.Join.ROUND、Paint.Join.MITER
*
* @param canvas
*/
private void testOfJoin(Canvas canvas) {
mRedPaint.setStyle(Paint.Style.STROKE);
mRedPaint.setStrokeWidth(40);
Path path = new Path();
path.moveTo(30, 0);
path.lineTo(0, 100);
path.lineTo(100, 100);
canvas.save();
canvas.translate(600, 100);
mRedPaint.setStrokeJoin(Paint.Join.BEVEL);//直线(默认)
canvas.drawPath(path, mRedPaint);
canvas.translate(150, 0);
mRedPaint.setStrokeJoin(Paint.Join.ROUND);//圆角
canvas.drawPath(path, mRedPaint);
canvas.translate(150, 0);
mRedPaint.setStrokeJoin(Paint.Join.MITER);//锐角
canvas.drawPath(path, mRedPaint);
canvas.restore();
}