.. 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.AnimationDecoder:
==========================================================================================================================================
|phoenix_title| **wx.adv.AnimationDecoder**
==========================================================================================================================================
:ref:`wx.adv.AnimationDecoder` is used by :ref:`wx.adv.Animation` for loading frames and other information for the animation from the animation image file.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
AnimationDecoder:
|
|sub_classes| Known Subclasses
==============================
:ref:`wx.adv.ANIDecoder`, :ref:`wx.adv.GIFDecoder`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.adv.AnimationDecoder.__init__`
:meth:`~wx.adv.AnimationDecoder.CanRead` Returns ``True`` if this decoder supports loading from the given stream.
:meth:`~wx.adv.AnimationDecoder.Clone` Create a copy of this decoder.
:meth:`~wx.adv.AnimationDecoder.ConvertToImage` Convert given frame to :ref:`wx.Image`.
:meth:`~wx.adv.AnimationDecoder.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:`~AnimationDecoder.CanRead` will do it.
:meth:`~wx.adv.AnimationDecoder.GetAnimationSize`
:meth:`~wx.adv.AnimationDecoder.GetBackgroundColour`
:meth:`~wx.adv.AnimationDecoder.GetDelay` Return the number of milliseconds this frame should be displayed.
:meth:`~wx.adv.AnimationDecoder.GetDisposalMethod` What should be done after displaying this frame.
:meth:`~wx.adv.AnimationDecoder.GetFrameCount`
:meth:`~wx.adv.AnimationDecoder.GetFramePosition`
:meth:`~wx.adv.AnimationDecoder.GetFrameSize`
:meth:`~wx.adv.AnimationDecoder.GetTransparentColour` The transparent colour for this frame, if any, or ``NullColour`` .
:meth:`~wx.adv.AnimationDecoder.GetType` Return the animation type this decoder implements.
:meth:`~wx.adv.AnimationDecoder.Load` Load the animation image frames from the given stream.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.adv.AnimationDecoder.AnimationSize` See :meth:`~wx.adv.AnimationDecoder.GetAnimationSize`
:attr:`~wx.adv.AnimationDecoder.BackgroundColour` See :meth:`~wx.adv.AnimationDecoder.GetBackgroundColour`
:attr:`~wx.adv.AnimationDecoder.FrameCount` See :meth:`~wx.adv.AnimationDecoder.GetFrameCount`
:attr:`~wx.adv.AnimationDecoder.Type` See :meth:`~wx.adv.AnimationDecoder.GetType`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.adv.AnimationDecoder(ObjectRefData)
**Possible constructors**::
AnimationDecoder() -> None
AnimationDecoder is used by Animation for loading frames and other
information for the animation from the animation image file.
.. method:: __init__(self)
:rtype: `None`
.. method:: CanRead(self, stream : InputStream)
Returns ``True`` if this decoder supports loading from the given stream.
:param `stream`:
:type `stream`: wx.InputStream
:rtype: `bool`
.. method:: Clone(self)
Create a copy of this decoder.
:rtype: :ref:`wx.adv.AnimationDecoder`
.. method:: ConvertToImage(self, frame : int, image : 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 : InputStream)
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:: GetAnimationSize(self)
:rtype: `Size`
.. method:: GetBackgroundColour(self)
:rtype: `Colour`
.. method:: GetDelay(self, frame : int)
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: `int`
.. method:: GetDisposalMethod(self, frame : int)
What should be done after displaying this frame.
:param `frame`:
:type `frame`: int
:rtype: :ref:`wx.adv.AnimationDisposal`
.. method:: GetFrameCount(self)
:rtype: `int`
.. method:: GetFramePosition(self, frame : int)
:param `frame`:
:type `frame`: int
:rtype: `Point`
.. method:: GetFrameSize(self, frame : int)
:param `frame`:
:type `frame`: int
:rtype: `Size`
.. method:: GetTransparentColour(self, frame : int)
The transparent colour for this frame, if any, or ``NullColour`` .
:param `frame`:
:type `frame`: int
:rtype: `Colour`
.. method:: GetType(self)
Return the animation type this decoder implements.
:rtype: :ref:`wx.adv.AnimationType`
.. method:: Load(self, stream : InputStream)
Load the animation image frames from the given stream.
:param `stream`:
:type `stream`: wx.InputStream
:rtype: `bool`
.. attribute:: AnimationSize
See :meth:`~wx.adv.AnimationDecoder.GetAnimationSize`
.. attribute:: BackgroundColour
See :meth:`~wx.adv.AnimationDecoder.GetBackgroundColour`
.. attribute:: FrameCount
See :meth:`~wx.adv.AnimationDecoder.GetFrameCount`
.. attribute:: Type
See :meth:`~wx.adv.AnimationDecoder.GetType`