在屏幕上的CALayers上混合模式?那可能吗? [英] Blending modes on CALayers on screen? Is that possible?

查看:114
本文介绍了在屏幕上的CALayers上混合模式?那可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能在屏幕上使用混合模式组合另一个CALayer吗?



我现在可以使用drawinrect进行屏幕截图,但是

解决方案

/ div>

使用CALayers为您完成简单的合成。如果图层标记为非透明,任何透明或半透明区域将允许来自当前图层后面的内容显示。



在Mac上,Core Image过滤器可以用于通过 compositingFilter backgroundFilter 过滤器向此过程添加效果属性。但是,Core Image在iPhone上不可用。


Is that possible to have a CALayer over another one composed using a blending mode on screen?

I now that it is possible to do that offscreen using drawinrect, but is it possible to see it live on the screen?

thanks for any help.

解决方案

Simple compositing is done for you with CALayers. If the layer is marked as being non-opaque, any transparent or translucent areas will allow content from layers behind the current one to show through.

On the Mac, Core Image filters can be used to add effects to this process via the compositingFilter, backgroundFilter, or filters properties. However, Core Image is not available on the iPhone.

这篇关于在屏幕上的CALayers上混合模式?那可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆