Duck
Duck

Reputation: 36013

Blending modes on CALayers on screen? Is that possible?

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.

Upvotes: 5

Views: 5900

Answers (1)

Brad Larson
Brad Larson

Reputation: 170317

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.

Upvotes: 6

Related Questions