- // this is the colour to use for the wxANIM_TOBACKGROUND disposal.
- // if not specified by the animation, it's set to wxNullColour
- wxColour m_background;
+ virtual bool Load( wxInputStream& stream ) = 0;
+
+ bool CanRead( wxInputStream& stream ) const
+ {
+ // NOTE: this code is the same of wxImageHandler::CallDoCanRead
+
+ if ( !stream.IsSeekable() )
+ return false; // can't test unseekable stream
+
+ wxFileOffset posOld = stream.TellI();
+ bool ok = DoCanRead(stream);
+
+ // restore the old position to be able to test other formats and so on
+ if ( stream.SeekI(posOld) == wxInvalidOffset )
+ {
+ wxLogDebug(wxT("Failed to rewind the stream in wxAnimationDecoder!"));
+
+ // reading would fail anyhow as we're not at the right position
+ return false;
+ }
+
+ return ok;
+ }
+
+ virtual wxAnimationDecoder *Clone() const = 0;
+ virtual wxAnimationType GetType() const = 0;
+
+ // convert given frame to wxImage
+ virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;