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

这个库太棒了! #35

Open
vincent9917 opened this issue Sep 19, 2019 · 2 comments
Open

这个库太棒了! #35

vincent9917 opened this issue Sep 19, 2019 · 2 comments

Comments

@vincent9917
Copy link

后面可以添加一个橡皮擦的功能么?

@lincf0912
Copy link
Owner

很抱歉,短时间内是加不了。我需要思考它的是如何工作的。
现在的绘画层是由多个图层组合而成。由开始画(手指按下屏幕)到结束画(手指离开屏幕)为一个图层,随着绘画的次数越多,图层就越多。撤销是将最顶的图层去掉就是了。假设这里已经绘制30个图层。
1、橡皮擦会将图层绘制的次数放大,每一次移动,都必须修改所有的绘画层的笔画。
2、撤销的原理实现也大有不同,每次撤销也需要对所有的绘画层处理。
即使使用脏矩形,效率仍然不理想。
这个功能需要待有一段空闲时间去思考它。
现在优先处理项目的内存管理与画笔的使用。

@lincf0912
Copy link
Owner

#45

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