In CoreGraphics drawing how can I keep the point of overlap from being darker than the rest of the line?

本秂侑毒 提交于 2019-12-05 16:56:39
Kris Van Bael

I suppose you want a single stroke not to darken itself, but still to darken previous strokes (that's how most painting apps work).

For this to work, you need two views/buffers, one for the 'current background' and one for the current stroke. Merge the latter with the background when the finger is released.

You always draw with alpha 1 in the current stroke buffer, but you display and merge it with a lower alpha.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!