Martin Luessi schrieb:
> Hi,

Hi there :)

> ...
> I tried using a custom behavior that moves a clutter.group containing
> all the slides and simultaneously changes the scale of the stage, i.e.
> 
>     def do_alpha_notify (self, alpha_value):
>         pos_x = self.start_x + alpha_value*self.dx
>         pos_y = self.start_y + alpha_value*self.dy
>         self.actor.set_position(pos_x, pos_y)
>         scale = self.zoom_start + alpha_value*self.d_zoom
>         self.stage.set_scale(scale, scale)
> 
> The problem is that this does not result in a linear zoom effect, it
> appears more like the camera moves along a curve in the 3D space. Does
> anyone have an idea how a linear zoom effect like used in impressive
> could be implemented?

My guess for the "curve effect" would be that scaling is applied from
(0, 0), i.e. from top-left of the actor (or here: stage). While moving
to the position, the position moves away from you via scaling. I could
be wrong though, as I've not seen the effect myself :) .

I would suggest that you use set_depth for zooming. Set the depth of
your group large enough so that you have a nice overview of the slides
and in your do_alpha_notify function set it back to zero (assuming that
one slide fills the stage at a depth of zero).

Hope that helps :)
- Sven

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to