[英]Alpha blending with the same transparent image
I'd like to draw in my iPad app as in the following image. 我想绘制我的iPad应用程序,如下图所示。
But what I got is the following result. 但是我得到的是以下结果。
Following is my code to draw the image. 以下是我绘制图像的代码。
[brushImage drawAtPoint:CGPointZero blendMode:kCGBlendModeNormal alpha:.1f];
How do I blend a transparent image and get the result like first picture? 如何融合透明图像并获得像第一张图片一样的结果? Any suggestion? 有什么建议吗?
Many thanks. 非常感谢。
i guess, when you start brushing you should create a UIView, that will contain all the points; 我想,当您开始刷牙时,应该创建一个UIView,它将包含所有要点; than apply the alpha to that view 比将alpha应用于该视图
(this is a useful way, because let you easily implement the undo functionality in your project) (这是一种有用的方法,因为可以轻松地在项目中实现撤消功能)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.