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

请问橡皮擦画笔如何使用 #16

Closed
saltwater2233 opened this issue Feb 16, 2019 · 1 comment
Closed

请问橡皮擦画笔如何使用 #16

saltwater2233 opened this issue Feb 16, 2019 · 1 comment

Comments

@saltwater2233
Copy link

感谢你的优秀项目,我有几个疑问想请教:

  1. 请问橡皮擦画笔如何使用?
    直接设置doodleView.setPen(DoodlePen.ERASER)不起效果,
    然后参考了MosaicDemo的马赛克画笔,发现需要使用doodleView.setColor()才行。
    我尝试doodleView.setColor(null)但是crash了,不知道橡皮擦是否需要调用这个方法,参数该如何设置。

  2. 如何使图片和View一样大?
    我想图片拉伸成和手机屏幕一样的大小,就像ImageView的scaleType设置为fitXY

@1993hzw
Copy link
Owner

1993hzw commented Feb 18, 2019

橡皮擦和仿制的原理是使用原图作为画笔的底图,因此需要设置setColor(new DoodleColor(doodle.getBitmap()));
不过经过的提示,我做了优化,直接在相应的画笔内部做了优化,不需要额外调用setcolor了.最新版本为v5.4.0.2

你可以参考代码

@1993hzw 1993hzw closed this as completed Feb 18, 2019
@chgmxx chgmxx mentioned this issue Sep 29, 2021
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

2 participants