documentation indexreference manualfunction index

SizeZoom

Function: SizeZoom (start, end, time, after_child=None, time_warp=None, bilinear=True, opaque=True, anim_timebase=False, repeat=False, **properties):


This causes the child displayable to be zoomed to a size that is linearly interpolated between the start and end sizes. The zoom will take time seconds, after which it will be shown at the end size, unless an after_child is given.

The start and end rectangles must fit completely inside the size of the child, otherwise an error will occur.

start - The starting size, a (width, height) tuple.

end - The end size, a (width, height) tuple.

time - The amount of time it will take to interpolate from the start to the end rectangle.

after_child - If present, a second child widget. This displayable will be rendered after the zoom completes. Use this to snap to a sharp displayable after the zoom is done.

time_warp - If not None, a function that takes a fractional period (between 0.0 and 0.1), and returns a fractional period. Use this to implement non-linear zooms. This function may be pickled, so it cannot be a lambda or other non-top-level function.

bilinear - If True, the default, this will use bilinear filtering. If false, this will use ugly yet fast nearest neighbor filtering.

opaque - If True and bilinear is True, this will use a very efficient method that does not support transparency. If False, this supports transparency, but is less efficient.

anim_timebase is true to use the animation timebase, false to use the displayable timebase.

repeat- causes the zoom to repeat every time seconds.

Example

scene bg whitehouse at Zoom((800, 600), (0, 0, 800, 600), (225, 150, 400, 300), 1.0)

"We can zoom into images..."

scene bg whitehouse at Zoom((800, 600), (225, 150, 400, 300), (0, 0, 800, 600), 1.0)

"... and zoom back out of them again."



documentation indexreference manualfunction index