On Feb 16, 2010, at 11:18 PM, Kalyanraju M wrote:

> I am trying to implement Ken-burns effect for iPhone. Implemented Zoom-In And 
> Zoom-Out. Got struck while implementing "Panning". 
> 
> Any ideas to implement "Panning". 

Panning's just changing the x/y offset, while zooming changes the x/y scale. So 
figure out a position to start and end, and interpolate between them based on 
the time elapsed.

fract = (now - startTime) / totalTime
x = x0 + fract*(x1-x0)
y = y0 + fract*(y1-y0)
scale = scale0 + fract*(scale1-scale0)

then construct a transform based on x,y and scale, and set that.

—Jens_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to