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.adv.Animation.
Note that on wxGTK wx.adv.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 wx.adv.Animation is always capable of loading both GIF
and ANI
formats (i.e. both ANIMATION_TYPE_GIF
and ANIMATION_TYPE_ANI
).
See also
wx.adv.AnimationCtrl, Animation Sample
__init__ |
Default constructor. |
GetDelay |
Returns the delay for the i-th frame in milliseconds. |
GetFrame |
Returns the i-th frame as a wx.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. |
wx.adv.
Animation
(Object)¶Possible constructors:
Animation()
Animation(anim)
Animation(name, type=ANIMATION_TYPE_ANY)
This class encapsulates the concept of a platform-dependent animation.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, anim)
Copy constructor.
Parameters: | anim (wx.adv.Animation) – |
---|
__init__ (self, name, type=ANIMATION_TYPE_ANY)
Loads an animation from a file.
Parameters: |
|
---|
GetDelay
(self, i)¶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 |
GetFrame
(self, i)¶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.
Parameters: | i (int) – |
---|---|
Return type: | Image |
GetFrameCount
(self)¶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 |
---|
IsOk
(self)¶Returns True
if animation data is present.
Return type: | bool |
---|
Load
(self, stream, type=ANIMATION_TYPE_ANY)¶Loads an animation from the given stream.
Parameters: |
|
---|---|
Return type: | bool |
Returns: |
|
LoadFile
(self, name, type=ANIMATION_TYPE_ANY)¶Loads an animation from a file.
Parameters: |
|
---|---|
Return type: | bool |
Returns: |
|
FrameCount
¶See GetFrameCount