Android Canvas clipPath 画图锯齿问题
android
在Canvas上裁剪一个Path,将Bitmap画上去,出现锯齿问题。
Path path = new Path();
path.addCircle(left, top, radius, Path.Direction.CCW);
canvas.save();
canvas.clipPath(path);
Rect destRect = new Rect(left, top,
right, bottom);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setAntiAlias(true);
canvas.drawBitmap(bitmap, srcRect, destRect, paint);
canvas.restore();