wx.animate.Animation

Inheritance diagram for wx.animate.Animation:



Description

This class encapsulates the concept of a platform-dependent animation. An animation is a sequence of frames of the same size.

Sound is not supported by wx.animate.Animation.

Derived From

Class API

Methods

__init__(name, type=wx.animate.ANIMATION_TYPE_ANY)

Loads an animation from a file.

Parameters:

  • name (string): The name of the file to load.
  • type (int): See LoadFile for more info.

Returns:

wx.animate.AnimationCtrl


GetBackgroundColour()
No docstrings available for this method.

GetDelay(i)

Returns the delay for the i-th frame in milliseconds. If -1 is returned the frame is to be displayed forever.

Parameters:

  • i: The i-th frame.

Returns:

int


GetDisposalMethod(frame)

Parameters:

  • frame (int)

Returns:

int


GetFrame(i)

Returns the i-th frame as a wx.Image.

Parameters:

  • i: The i-th frame.

Returns:

wx.Image


GetFrameCount()

Returns the number of frames for this animation.


Returns:

int


GetFramePosition(frame)

Parameters:

  • frame (int)

Returns:

wx.Point


GetFrameSize(frame)

Parameters:

  • frame (int)

Returns:

wx.Size


GetSize()

Returns the size of the animation


Returns:

wx.Size


GetTransparentColour(frame)

Parameters:

  • frame (int)

Returns:

wx.Colour


IsOk()

Returns True if animation data is present.


Returns:

bool


Load(stream, type=wx.animate.ANIMATION_TYPE_ANY)

Loads an animation from the given stream.

Returns True if the operation succeeded, False otherwise.

Parameters:

  • stream (wx.InputStream): The stream to use to oad the animation.

  • type (int): One of the following values:

    Animation Type

    Description

    wx.animate.ANIMATION_TYPE_GIF

    Load an animated GIF file.

    wx.animate.ANIMATION_TYPE_ANI

    Load an ANI file.

    wx.animate.ANIMATION_TYPE_ANY

    Try to autodetect the filetype.


Returns:

bool


LoadFile(name, type=wx.animate.ANIMATION_TYPE_ANY)

Loads an animation from a file.

Returns True if the operation succeeded, False otherwise.

Parameters:

  • name (string): A filename.

  • type (int): One of the following values:

    Animation Type

    Description

    wx.animate.ANIMATION_TYPE_GIF

    Load an animated GIF file.

    wx.animate.ANIMATION_TYPE_ANI

    Load an ANI file.

    wx.animate.ANIMATION_TYPE_ANY

    Try to autodetect the filetype.


Returns:

bool