******************** wx.animate.Animation ******************** Inheritance diagram for `wx.animate.Animation`: | .. inheritance-diagram:: 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`. .. seealso:: `wx.animate.AnimationCtrl `_ Derived From ^^^^^^^^^^^^^ * `wx.GDIObject <../Widgets/wx.GDIObject.html>`_ * `wx.Object <../Widgets/wx.Object.html>`_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetBackgroundColour <#GetBackgroundColour>`_ * `GetDelay <#GetDelay>`_ * `GetDisposalMethod <#GetDisposalMethod>`_ * `GetFrameCount <#GetFrameCount>`_ * `GetFramePosition <#GetFramePosition>`_ * `GetFrameSize <#GetFrameSize>`_ * `GetSize <#GetSize>`_ * `GetTransparentColour <#GetTransparentColour>`_ * `IsOk <#IsOk>`_ * `Load <#Load>`_ * `LoadFile <#LoadFile>`_ Class API ========= Methods ^^^^^^^ .. method:: __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 <#LoadFile>`_ for more info. | **Returns:** `wx.animate.AnimationCtrl `_ -------- .. method:: GetBackgroundColour() `No docstrings available for this method.` -------- .. 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` -------- .. method:: GetDisposalMethod(frame) | **Parameters:** * `frame` (int) | **Returns:** `int` -------- .. method:: GetFrame(i) Returns the i-th frame as a `wx.Image <../Widgets/wx.Image.html>`_. **Parameters:** * `i`: The `i`-th frame. | **Returns:** `wx.Image <../Widgets/wx.Image.html>`_ -------- .. method:: GetFrameCount() Returns the number of frames for this animation. | **Returns:** `int` -------- .. method:: GetFramePosition(frame) | **Parameters:** * `frame` (int) | **Returns:** `wx.Point <../Widgets/wx.Point.html>`_ -------- .. method:: GetFrameSize(frame) | **Parameters:** * `frame` (int) | **Returns:** `wx.Size <../Widgets/wx.Size.html>`_ -------- .. method:: GetSize() Returns the size of the animation | **Returns:** `wx.Size <../Widgets/wx.Size.html>`_ -------- .. method:: GetTransparentColour(frame) | **Parameters:** * `frame` (int) | **Returns:** `wx.Colour <../Widgets/wx.Colour.html>`_ -------- .. method:: IsOk() Returns ``True`` if animation data is present. | **Returns:** `bool` -------- .. method:: 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 <../Widgets/wx.InputStream.html>`_): 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` -------- .. method:: 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`