Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.0及以上系统图片一次圆一次方的解决办法 #22

Open
uuuBird opened this issue Dec 27, 2019 · 6 comments
Open

9.0及以上系统图片一次圆一次方的解决办法 #22

uuuBird opened this issue Dec 27, 2019 · 6 comments

Comments

@uuuBird
Copy link

uuuBird commented Dec 27, 2019

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
canvas.drawPath(path, paint);
} else {
srcPath.addRect(srcRectF, Path.Direction.CCW);
// 计算tempPath和path的差集
srcPath.op(path, Path.Op.DIFFERENCE);
canvas.drawPath(srcPath, paint);
srcPath.reset();//1
}
再onDraw方法中添加注释1处的代码就好了

@LYSHIXD
Copy link

LYSHIXD commented Feb 10, 2020

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
canvas.drawPath(path, paint);
} else {
srcPath.addRect(srcRectF, Path.Direction.CCW);
// 计算tempPath和path的差集
srcPath.op(path, Path.Op.DIFFERENCE);
canvas.drawPath(srcPath, paint);
srcPath.reset();//1
}
再onDraw方法中添加注释1处的代码就好了

感谢感谢

@baikunlong
Copy link

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
canvas.drawPath(path, paint);
} else {
srcPath.addRect(srcRectF, Path.Direction.CCW);
// 计算tempPath和path的差集
srcPath.op(path, Path.Op.DIFFERENCE);
canvas.drawPath(srcPath, paint);
srcPath.reset();//1
}
再onDraw方法中添加注释1处的代码就好了

感谢大佬!!!

@wmailn
Copy link

wmailn commented Jul 11, 2020

感谢

@df13954
Copy link

df13954 commented Sep 2, 2020

为什么库的作者不修复下呢

@Jorelanbo
Copy link

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
canvas.drawPath(path, paint);
} else {
srcPath.addRect(srcRectF, Path.Direction.CCW);
// 计算tempPath和path的差集
srcPath.op(path, Path.Op.DIFFERENCE);
canvas.drawPath(srcPath, paint);
srcPath.reset();//1
}
再onDraw方法中添加注释1处的代码就好了

大佬,求告知原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@wmailn @LYSHIXD @df13954 @Jorelanbo @uuuBird @baikunlong and others