On 20/02/2013, at 5:42 AM, Oleg Krupnov <oleg.krup...@gmail.com> wrote:

> In my understanding, if I apply, say, a blur filter to layer's
> background (CALayer->backgroundFilters), all layers that are behind
> that layer - that is, immediate parent, grand parent, etc. and all
> children and siblings of those parent and grandparents that are lower
> in the tree of layers - should appear blurred.
> 
> An experiment however shows that it's not the case. The background
> blur filter only blurs the direct parent of the target layer, but not
> its grandparent and other layers.
> 
> The same applies for compositingFilter.
> 
> Am I doing something wrong?
> 
> Or, if this is the way it should work as documented, how do achieve
> the effect I want?


I think your understanding is incorrect. My interpretation of the docs is 
simply that the background - that is to say, the background colour of the layer 
- is filtered. If you think about how layers are composited, this is the only 
interpretation that makes sense - how could a layer retroactively apply a bunch 
of filters to things that have already been rendered?

Setting the filters on the root layer or on some layer further up the tree 
should achieve the effect you want, though most likely you'll want the 
compositingFilters rather than the background filters property.


--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to