The wx.adv.Animation class handles the interface between the animation control and the details of the animation image or data.
See also
wx.adv.AnimationCtrl, Animation Sample
Constructs a new empty animation object. |
|
Add a new decoder to the list of animation decoders. |
|
Clear out the animation decoder list. |
|
Search for an animation decoder by type. |
|
Returns the delay for the i-th frame in milliseconds. |
|
Returns the i-th frame as a wx.Image. |
|
Returns the number of frames for this animation. |
|
Returns the list of animation decoders used by the generic animation and wx.adv.GenericAnimationCtrl. |
|
Returns the size of the animation. |
|
Load the stock animation decoders (currently |
|
Insert a new decoder to the front of the list of animation decoders. |
|
Returns |
|
Returns |
|
Loads an animation from the given stream. |
|
Loads an animation from a file. |
See |
|
See |
Possible constructors:
Animation() -> None
Animation(name : str, type: AnimationType=ANIMATION_TYPE_ANY) -> None
Animation(other : Animation) -> None
The Animation class handles the interface between the animation control and the details of the animation image or data.
__init__ (self)
Constructs a new empty animation object.
Call Load
to initialize it.
None
See also
__init__ (self, name : str, type: AnimationType=ANIMATION_TYPE_ANY)
Constructs a new animation object and load the animation data from the given filename.
name (string) – A filename.
type (AnimationType) – One of the wx.adv.AnimationType values; wx.adv.ANIMATION_TYPE_ANY
means that the function should try to autodetect the filetype.
None
See also
__init__ (self, other : Animation)
Copy constructor.
other (wx.adv.Animation)
None
Add a new decoder to the list of animation decoders.
handler (wx.adv.AnimationDecoder)
None
Clear out the animation decoder list.
This is called automatically at program shutdown.
None
Search for an animation decoder by type.
animType (AnimationType)
Returns the delay for the i-th frame in milliseconds.
If -1
is returned the frame is to be displayed forever.
frame (int)
int
Returns the i-th frame as a wx.Image.
This method is not implemented in the native wxGTK implementation of this class and always returns an invalid image there.
frame (int)
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.
int
Returns the list of animation decoders used by the generic animation and wx.adv.GenericAnimationCtrl.
AnimationDecoderList
Load the stock animation decoders (currently GIF
and ANI
) into the list of decoders.
This is called automatically at program startup.
None
Insert a new decoder to the front of the list of animation decoders.
handler (wx.adv.AnimationDecoder)
None
Returns True
if animation can be used with controls of the given type.
This function checks if this animation object can be used with wx.adv.AnimationCtrl of particular type. This will be always the case for the platforms where only a single wx.adv.AnimationCtrl implementation is available, but not necessarily under e.g. wxGTK where both native (but limited) GTK implementation and generic implementation can be used.
ci (wx.ClassInfo)
bool
Added in version 4.1/wxWidgets-3.1.4.
Returns True
if animation data is present.
bool
Loads an animation from the given stream.
stream (wx.InputStream) – The stream to use to load the animation. Under wxGTK may be any kind of stream; under other platforms this must be a seekable stream.
type (AnimationType) – One of the wx.adv.AnimationType enumeration values.
bool
True
if the operation succeeded, False
otherwise.
Loads an animation from a file.
name (string) – A filename.
type (AnimationType) – One of the wx.adv.AnimationType values; wx.adv.ANIMATION_TYPE_ANY
means that the function should try to autodetect the filetype.
bool
True
if the operation succeeded, False
otherwise.
See GetFrameCount