.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.adv.ANIDecoder:

==========================================================================================================================================
|phoenix_title|  **wx.adv.ANIDecoder**
==========================================================================================================================================

An animation decoder supporting animated cursor (.ani) files.           




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>ANIDecoder</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.adv.ANIDecoder_inheritance.png" alt="Inheritance diagram of ANIDecoder" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.adv.ANIDecoder.html" title="wx.adv.ANIDecoder" alt="" coords="27,160,177,189"/> <area shape="rect" id="node2" href="wx.adv.AnimationDecoder.html" title="wx.adv.AnimationDecoder" alt="" coords="5,83,199,112"/> <area shape="rect" id="node3" href="wx.ObjectRefData.html" title="wx.ObjectRefData" alt="" coords="33,5,171,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.adv.ANIDecoder.__init__`                                              
:meth:`~wx.adv.ANIDecoder.Clone`                                                 Create a copy of this decoder.
:meth:`~wx.adv.ANIDecoder.ConvertToImage`                                        Convert given frame to  :ref:`wx.Image`.
:meth:`~wx.adv.ANIDecoder.DoCanRead`                                             Checks the signature of the data in the given stream and returns ``True`` if it appears to be a valid animation format recognized by the animation decoder; this function should modify the stream current position without taking care of restoring it since  :meth:`~ANIDecoder.CanRead`   will do it.
:meth:`~wx.adv.ANIDecoder.GetDelay`                                              Return the number of milliseconds this frame should be displayed.
:meth:`~wx.adv.ANIDecoder.GetDisposalMethod`                                     What should be done after displaying this frame.
:meth:`~wx.adv.ANIDecoder.GetFramePosition`                                      
:meth:`~wx.adv.ANIDecoder.GetFrameSize`                                          
:meth:`~wx.adv.ANIDecoder.GetTransparentColour`                                  The transparent colour for this frame, if any, or  ``NullColour`` .
:meth:`~wx.adv.ANIDecoder.GetType`                                               Return the animation type this decoder implements.
:meth:`~wx.adv.ANIDecoder.Load`                                                  Load the animation image frames from the given stream.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.adv.ANIDecoder.Type`                                                  See :meth:`~wx.adv.ANIDecoder.GetType`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.adv.ANIDecoder(AnimationDecoder)

   **Possible constructors**::

       ANIDecoder()
       
   
   An animation decoder supporting animated cursor (.ani) files.



   .. method:: __init__(self)






   .. method:: Clone(self)

      Create a copy of this decoder.                  

      :rtype: :ref:`wx.adv.AnimationDecoder`








   .. method:: ConvertToImage(self, frame, image)

      Convert given frame to  :ref:`wx.Image`.                   


      :param `frame`: 
      :type `frame`: int
      :param `image`: 
      :type `image`: wx.Image




      :rtype: `bool`








   .. method:: DoCanRead(self, stream)

      Checks the signature of the data in the given stream and returns ``True`` if it appears to be a valid animation format recognized by the animation decoder; this function should modify the stream current position without taking care of restoring it since  :meth:`CanRead`   will do it.                   


      :param `stream`: 
      :type `stream`: wx.InputStream




      :rtype: `bool`








   .. method:: GetDelay(self, frame)

      Return the number of milliseconds this frame should be displayed.                  

      If -1 is returned then the frame must be displayed forever.                  


      :param `frame`: 
      :type `frame`: int




      :rtype: `long`








   .. method:: GetDisposalMethod(self, frame)

      What should be done after displaying this frame.                  


      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`wx.adv.AnimationDisposal`








   .. method:: GetFramePosition(self, frame)




      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`Point`








   .. method:: GetFrameSize(self, frame)




      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`Size`








   .. method:: GetTransparentColour(self, frame)

      The transparent colour for this frame, if any, or  ``NullColour`` .                   


      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`Colour`








   .. method:: GetType(self)

      Return the animation type this decoder implements.                  

      :rtype: :ref:`wx.adv.AnimationType`








   .. method:: Load(self, stream)

      Load the animation image frames from the given stream.                  


      :param `stream`: 
      :type `stream`: wx.InputStream




      :rtype: `bool`








   .. attribute:: Type

      See :meth:`~wx.adv.ANIDecoder.GetType`

