anim.Filmstrip - Ren'Py Visual Novel Engine

documentation index ◦ reference manual ◦ function index

# anim.Filmstrip

Function: | anim.Filmstrip | (image, framesize, gridsize, delay, frames=None, loop=True, **properties):

This creates an animation from a single image. This image must consist of a grid of frames, with the number of columns and rows in the grid being taken from gridsize, and the size of each frame in the grid being taken from framesize. This takes frames and sticks them into an Animation, with the given delay between each frame. The frames are taken by going from left-to-right across the first row, left-to-right across the second row, and so on until all frames are consumed, or a specified number of frames are taken.

image - The image that the frames must be taken from.

framesize - A (width, height) tuple giving the size of each of the frames in the animation.

gridsize - A (columns, rows) tuple giving the number of columns and rows in the grid.

delay - The delay, in seconds, between frames.

frames - The number of frames in this animation. If None, then this defaults to colums * rows frames, that is, taking every frame in the grid.

loop - If True, loop at the end of the animation. If False, this performs the animation once, and then stops.

Other keyword arguments are as for anim.SMAnimation.

## Example

    init:
        image ctc = anim.Filmstrip("sakura.png", (20, 20), (2, 1), .30,
                                   xpos=760, ypos=560, xanchor=0, yanchor=0)

documentation index ◦ reference manual ◦ function index