PixbufSimpleAnim

class PixbufSimpleAnim(**properties: Any)

Superclasses: PixbufAnimation, Object

An opaque struct representing a simple animation.

Constructors

class PixbufSimpleAnim
classmethod new(width: int, height: int, rate: float) PixbufSimpleAnim

Creates a new, empty animation.

Added in version 2.8.

Parameters:
  • width – the width of the animation

  • height – the height of the animation

  • rate – the speed of the animation, in frames per second

Methods

class PixbufSimpleAnim
add_frame(pixbuf: Pixbuf) None

Adds a new frame to animation. The pixbuf must have the dimensions specified when the animation was constructed.

Added in version 2.8.

Parameters:

pixbuf – the pixbuf to add

get_loop() bool

Gets whether animation should loop indefinitely when it reaches the end.

Added in version 2.18.

set_loop(loop: bool) None

Sets whether animation should loop indefinitely when it reaches the end.

Added in version 2.18.

Parameters:

loop – whether to loop the animation

Properties

class PixbufSimpleAnim
props.loop: bool

Whether the animation should loop when it reaches the end.

Added in version 2.18.