]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/animateg.cpp
fix another logical/physical coords confusion and update the comment to help with...
[wxWidgets.git] / src / generic / animateg.cpp
index 17605f1af85d68d8e04118313ac94c87dcdf6515..08155032960214d2ac947a2428ae57a29c054978 100644 (file)
@@ -42,7 +42,7 @@ wxAnimationDecoderList wxAnimation::sm_handlers;
 // ----------------------------------------------------------------------------
 
 IMPLEMENT_DYNAMIC_CLASS(wxAnimation, wxAnimationBase)
-#define M_ANIMDATA      wx_static_cast(wxAnimationDecoder*, m_refData)
+#define M_ANIMDATA      static_cast<wxAnimationDecoder*>(m_refData)
 
 wxSize wxAnimation::GetSize() const
 {
@@ -307,10 +307,15 @@ wxAnimationCtrl::~wxAnimationCtrl()
 }
 
 bool wxAnimationCtrl::LoadFile(const wxString& filename, wxAnimationType type)
+{
+    wxFileInputStream fis(filename);
+    return Load(fis, type);
+}
+
+bool wxAnimationCtrl::Load(wxInputStream& stream, wxAnimationType type)
 {
     wxAnimation anim;
-    if (!anim.LoadFile(filename, type) ||
-        !anim.IsOk())
+    if ( !anim.Load(stream, type) || !anim.IsOk() )
         return false;
 
     SetAnimation(anim);