Class pyglet.image.AbstractImageSequence

Known Subclasses:
ImageGrid, TextureSequence

Abstract sequence of images.

The sequence is useful for storing image animations or slices of a volume. For efficient access, use the texture_sequence member. The class also implements the sequence interface (__len__, __getitem__, __setitem__).

Methods

TextureSequence get_texture_sequence(self)
Get a TextureSequence.
Animation get_animation(self, period, loop=True)
Create an animation over this image sequence for the given constant framerate.
AbstractImage __getitem__(self, slice)
Retrieve a (list of) image.
  __setitem__(self, slice, image)
Replace one or more images in the sequence.
  __len__(self)
Iterator __iter__(self)
Iterate over the images in sequence.

Properties

TextureSequence texture_sequence
Access this image sequence as a texture sequence.

Method Details

get_texture_sequence

get_texture_sequence(self)
Get a TextureSequence.
Returns: TextureSequence

Since: pyglet 1.1

get_animation

get_animation(self, period, loop=True)

Create an animation over this image sequence for the given constant framerate.

:Parameters
period : float
Number of seconds to display each frame.
loop : bool
If True, the animation will loop continuously.
Returns: Animation

Since: pyglet 1.1

__setitem__

(Index assignment operator) __setitem__(self, slice, image)
Replace one or more images in the sequence.
Parameters:
image : AbstractImage
The replacement image. The actual instance may not be used, depending on this implementation.

__iter__

__iter__(self)
Iterate over the images in sequence.
Returns: Iterator

Since: pyglet 1.1


Property Details

texture_sequence

Access this image sequence as a texture sequence.

Deprecated: Use get_texture_sequence

Type:
TextureSequence