Re: Using custom inputExtent for Core Animation transition

Christiaan Hofman <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Sep 19, 2009, at 19:04, Matt Neuburg wrote:

> On Sat, 12 Sep 2009 15:43:11 +0200, Christiaan Hofman <[email protected] 
> >
> said:
>> I am trying to use core animation, in particular a CATransition  
>> with a
>> CIFilter, to animate the transition of an image (layer contents) in a
>> layer-hosting view. Problem is that the animation seems to override
>> the inputExtent of the CIFilter to the full bounds of the layer. I
>> really need it to be different from that. Is there any way this can  
>> be
>> done with core animation transitions? Just making the layer smaller  
>> is
>> not an option, because I do want the transition to play in the whole
>> area I'm currently having.
>
> I think the docs are pretty clear on this one, that if inputExtent is
> supported by the filter it *is* overridden and set to the full  
> bounds of the
> layer, just as you say. If you don't want this to happen, you'll  
> have to
> stop using your current approach of having the animation take place
> automatically in response to your setting the content of the layer,  
> and
> control the *whole* behavior of the layer yourself. In other words,  
> you are
> using a simplified approach where you attach a filter to a  
> CATransition and
> let the system construct and run the actual animation for you  
> (setting the
> input image to the old content and output image to the new content);  
> if you
> want more control, you must construct the *whole* filter (supplying  
> the
> input image and output image explicitly, yourself) and animate the  
> filter
> yourself. m.
>
> -- 
> matt neuburg, phd = [email protected], <http://www.tidbits.com/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide - Second Edition!
> http://www.tidbits.com/matt/default.html#applescriptthings


Thanks, I was afraid that was the answer. Anyway, I've given up on CA  
for now anyway, because performance on 10.5 is unacceptable (see my  
other message). So I'm going back to what I did using more explicit  
animations using NSAnimation, which gives me full control over the  
filter input, and moreover gives me better performance on 10.5  
(believe it or not).

Christiaan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.