我正在尝试从画布中删除路径或使其透明,我正在使用以下方法来执行此操作:
Canvas canvas = new Canvas(bmap);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setColor(Color.TRANSPARENT);
Path path=new Path();
//Add lines/arcs to path...
paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));//tried SRC,CLEAR
canvas.drawPath(path, paint);
但是路径被黑色填充,我想让它透明,可以吗?