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 Animation.
Note that on wxGTK Animation is capable of loading the formats supported by the internally-used gdk-pixbuf library (typically this means only ANIMATION_TYPE_GIF ). On other platforms Animation is always capable of loading both GIF and ANI formats (i.e. both ANIMATION_TYPE_GIF and ANIMATION_TYPE_ANI ).
See also
__init__ | Default constructor. |
GetDelay | Returns the delay for the i-th frame in milliseconds. |
GetFrame | Returns the i-th frame as a Image. |
GetFrameCount | Returns the number of frames for this animation. |
GetSize | Returns the size of the animation. |
IsOk | Returns True if animation data is present. |
Load | Loads an animation from the given stream. |
LoadFile | Loads an animation from a file. |
This class encapsulates the concept of a platform-dependent animation.
Possible constructors:
Animation()
Animation(anim)
Animation(name, type=ANIMATION_TYPE_ANY)
Overloaded Implementations:
__init__ (self)
Default constructor.
__init__ (self, anim)
Copy constructor.
Parameters: | anim (adv.Animation) – |
---|
__init__ (self, name, type=ANIMATION_TYPE_ANY)
Loads an animation from a file.
Parameters: |
|
---|
Returns the delay for the i-th frame in milliseconds.
If -1 is returned the frame is to be displayed forever.
Parameters: | i (int) – |
---|---|
Return type: | int |
Returns the i-th frame as a Image.
This method is not implemented in the native wxGTK implementation of this class and always returns an invalid image there.
Parameters: | i (int) – |
---|---|
Return type: | Image |
Returns the number of frames for this animation.
This method is not implemented in the native wxGTK implementation of this class and always returns 0 there.
Return type: | int |
---|
Returns True if animation data is present.
Return type: | bool |
---|
Loads an animation from the given stream.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if the operation succeeded, False otherwise. |
Loads an animation from a file.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if the operation succeeded, False otherwise. |
See GetFrameCount