private void cropImageByPath() {
//closing the path now.
clipPath.close();
//setting the fill type to inverse, so that the outer part of the selected path gets filled.
clipPath.setFillType(FillType.INVERSE_WINDING);
Paint xferPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
xferPaint.setColor(Color.BLACK);
canvas.drawPath(clipPath, xferPaint);
xferPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
canvas.drawBitmap(alteredBitmap, 0, 0, xferPaint);
}
MainActivity.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:FlexiCrop
作者:
评论列表
文章目录