Version: 3.1.5
wxAnimationDecoder Class Referenceabstract

#include <wx/animdecod.h>

+ Inheritance diagram for wxAnimationDecoder:

Detailed Description

wxAnimationDecoder is used by wxAnimation for loading frames and other information for the animation from the animation image file.

Public Member Functions

 wxAnimationDecoder ()
 
virtual bool Load (wxInputStream &stream)=0
 Load the animation image frames from the given stream. More...
 
bool CanRead (wxInputStream &stream) const
 Returns true if this decoder supports loading from the given stream. More...
 
virtual wxAnimationDecoderClone () const =0
 Create a copy of this decoder. More...
 
virtual wxAnimationType GetType () const =0
 Return the animation type this decoder implements. More...
 
virtual bool ConvertToImage (unsigned int frame, wxImage *image) const =0
 Convert given frame to wxImage. More...
 
virtual wxSize GetFrameSize (unsigned int frame) const =0
 
virtual wxPoint GetFramePosition (unsigned int frame) const =0
 
virtual wxAnimationDisposal GetDisposalMethod (unsigned int frame) const =0
 What should be done after displaying this frame. More...
 
virtual long GetDelay (unsigned int frame) const =0
 Return the number of milliseconds this frame should be displayed. More...
 
virtual wxColour GetTransparentColour (unsigned int frame) const =0
 The transparent colour for this frame, if any, or wxNullColour. More...
 
wxSize GetAnimationSize () const
 
wxColour GetBackgroundColour () const
 
unsigned int GetFrameCount () const
 

Protected Member Functions

virtual bool DoCanRead (wxInputStream &stream) const =0
 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 CanRead() will do it. More...
 

Constructor & Destructor Documentation

wxAnimationDecoder::wxAnimationDecoder ( )

Member Function Documentation

bool wxAnimationDecoder::CanRead ( wxInputStream stream) const

Returns true if this decoder supports loading from the given stream.

virtual wxAnimationDecoder* wxAnimationDecoder::Clone ( ) const
pure virtual

Create a copy of this decoder.

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual bool wxAnimationDecoder::ConvertToImage ( unsigned int  frame,
wxImage image 
) const
pure virtual

Convert given frame to wxImage.

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual bool wxAnimationDecoder::DoCanRead ( wxInputStream stream) const
protectedpure virtual

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 CanRead() will do it.

Implemented in wxGIFDecoder, and wxANIDecoder.

wxSize wxAnimationDecoder::GetAnimationSize ( ) const
wxColour wxAnimationDecoder::GetBackgroundColour ( ) const
virtual long wxAnimationDecoder::GetDelay ( unsigned int  frame) const
pure virtual

Return the number of milliseconds this frame should be displayed.

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

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual wxAnimationDisposal wxAnimationDecoder::GetDisposalMethod ( unsigned int  frame) const
pure virtual

What should be done after displaying this frame.

Implemented in wxGIFDecoder, and wxANIDecoder.

unsigned int wxAnimationDecoder::GetFrameCount ( ) const
virtual wxPoint wxAnimationDecoder::GetFramePosition ( unsigned int  frame) const
pure virtual

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual wxSize wxAnimationDecoder::GetFrameSize ( unsigned int  frame) const
pure virtual

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual wxColour wxAnimationDecoder::GetTransparentColour ( unsigned int  frame) const
pure virtual

The transparent colour for this frame, if any, or wxNullColour.

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual wxAnimationType wxAnimationDecoder::GetType ( ) const
pure virtual

Return the animation type this decoder implements.

Implemented in wxGIFDecoder, and wxANIDecoder.

virtual bool wxAnimationDecoder::Load ( wxInputStream stream)
pure virtual

Load the animation image frames from the given stream.

Implemented in wxGIFDecoder, and wxANIDecoder.