|
12-02-09 / 22:34 : Record a Core Animation animation (cjed) | The famous CIMG site provides a solution to Core Animation animations recording into a QuickTime movie, from te code that launches the animation (then faster than using an external tool). The trick is to trigger a timer at animation start, and at each timer invocation we make the CA layer draw into an in-memory Core Graphics context, then we convert it into an NSBitmapImageRep, and finally the image representation (TIFF here) is added to the previously instanciated QuickTime movie object. The CA layer used to draw into the context has to be the rootLayer's presentationLayer (bounding layer), not the animated layer. | | Comments | Write a comment | |
|