wxAnimationDecoder Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
wxAnimationDecoder Class Referenceabstract

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/animdecod.h>`

Inheritance diagram for wxAnimationDecoder:
[legend]

## 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.
bool | CanRead (wxInputStream &stream) const
| Returns true if this decoder supports loading from the given stream.
virtual wxAnimationDecoder * | Clone () const =0
| Create a copy of this decoder.
virtual wxAnimationType | GetType () const =0
| Return the animation type this decoder implements.
virtual bool | ConvertToImage (unsigned int frame, wxImage *image) const =0
| Convert given frame to `wxImage`.
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.
virtual long | GetDelay (unsigned int frame) const =0
| Return the number of milliseconds this frame should be displayed.
virtual wxColour | GetTransparentColour (unsigned int frame) const =0
| The transparent colour for this frame, if any, or `wxNullColour`.
wxSize | GetAnimationSize () const
wxColour | GetBackgroundColour () const
unsigned int | GetFrameCount () const
Public Member Functions inherited from wxRefCounter
| wxRefCounter ()
| Default constructor.
void | DecRef ()
| Decrements the reference count associated with this shared data and, if it reaches zero, destroys this instance of wxRefCounter releasing its memory.
int | GetRefCount () const
| Returns the reference count associated with this shared data.
void | IncRef ()
| Increments the reference count associated with this shared data.

## 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.
Protected Member Functions inherited from wxRefCounter
virtual | ~wxRefCounter ()
| Destructor.

## Constructor & Destructor Documentation

## ◆ wxAnimationDecoder()

wxAnimationDecoder::wxAnimationDecoder | ( |  | ) |

## Member Function Documentation

## ◆ CanRead()

bool wxAnimationDecoder::CanRead | ( | wxInputStream & | stream | ) | const

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

## ◆ Clone()

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

Create a copy of this decoder.

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ ConvertToImage()

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

Convert given frame to `wxImage`.

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ DoCanRead()

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 wxANIDecoder, and wxGIFDecoder.

## ◆ GetAnimationSize()

wxSize wxAnimationDecoder::GetAnimationSize | ( |  | ) | const

## ◆ GetBackgroundColour()

wxColour wxAnimationDecoder::GetBackgroundColour | ( |  | ) | const

## ◆ GetDelay()

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 wxANIDecoder, and wxGIFDecoder.

## ◆ GetDisposalMethod()

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

What should be done after displaying this frame.

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ GetFrameCount()

unsigned int wxAnimationDecoder::GetFrameCount | ( |  | ) | const

## ◆ GetFramePosition()

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

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ GetFrameSize()

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

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ GetTransparentColour()

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

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

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ GetType()

virtual wxAnimationType wxAnimationDecoder::GetType | ( |  | ) | const
| pure virtual

Return the animation type this decoder implements.

Implemented in wxANIDecoder, and wxGIFDecoder.

## ◆ Load()

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

Load the animation image frames from the given stream.

Implemented in wxANIDecoder, and wxGIFDecoder.