documentation index ◦ reference manual ◦ function index

# RotoZoom

Function: | RotoZoom | (rot_start, rot_end, rot_delay, zoom_start, zoom_end, zoom_delay, rot_repeat=False, zoom_repeat=False, rot_bounce=False, zoom_bounce=False, rot_anim_timebase=False, zoom_anim_timebase=False, rot_time_warp=None, zoom_time_warp=None, opaque=True, **properties):

This function returns an object, suitable for use in an at cause, that rotates and/or zooms its child.

rot_start - The number of degrees of clockwise rotation at the start time.

rot_end - The number of degrees of clockwise rotation at the end time.

rot_delay - The time it takes to complete rotation.

zoom_start - The zoom factor at the start time.

zoom_end - The zoom factor at the end time.

zoom_delay - The time it takes to complete a zoom.

rot_repeat - If true, the rotation cycle repeats once it is finished.

zoom_repeat - If true, the xzoom cycle repeats once it is finished.

rot_bounce - If true, rotate from start to end to start each cycle. If False, rotate from start to end once.

zoom_bounce - If true, zoom from start to end to start each cycle. If False, zoom from start to end once.

rot_anim_timebase - If true, rotation times are judged from when a displayable with the same tag was first shown. If false, times are judged from when this displayable was first shown.

zoom_anim_timebase - If true, zoom times are judged from when a displayable with the same tag was first shown. If false, times are judged from when this displayable was first shown.

opaque - This should be True if the child is fully opaque, and False otherwise.

RotoZoom uses a bilinear interpolation method that is accurate when the zoom factor is >= 0.5.

Rotation is around the center of the child displayable.

Note that this shrinks what it is rotozooming by 1 pixel horizontally and vertically. Images should be 1 pixel larger then they would otherwise be.

The produced displayable has height and with equal to the hypotenuse of the sides of the child. This may disturb the layout somewhat. To minimize this, position the center of the RotoZoom.

The time taken to RotoZoom is proportional to the area of the rotozoomed image that is shown on screen.

## Example

    show magic circle at RotoZoom(0, 360, 10, 0, 1, 1, rot_anim_timebase=True, opaque=False, xalign=0.5, yalign=0.5)
    $ renpy.pause(1.0)

    e "See my magic circle?"

    show magic circle at RotoZoom(0, 360, 10, 0, 1, 1, rot_anim_timebase=True, opaque=False, xalign=0.5, yalign=0.5)
    $ renpy.pause(1.0)

    hide magic circle

    e "Now you see it, now you don't!"

documentation index ◦ reference manual ◦ function index