• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Implementing Ken-burns Effect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing Ken-burns Effect


  • Subject: Re: Implementing Ken-burns Effect
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 18 Feb 2010 20:31:25 -0800

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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Implementing Ken-burns Effect (From: Kalyanraju M <email@hidden>)

  • Prev by Date: Re: NSPredicate regex
  • Next by Date: Re: close: before NSWindowWillCloseNotification
  • Previous by thread: Implementing Ken-burns Effect
  • Next by thread: Real-Time Validation in a NSTextField.
  • Index(es):
    • Date
    • Thread