#pragma hdrstop
#endif
-#if wxUSE_STREAMS && wxUSE_GIF
+#if wxUSE_STREAMS && wxUSE_ICO_CUR
+
+#include "wx/anidecod.h"
#ifndef WX_PRECOMP
#include "wx/palette.h"
#include <stdlib.h>
#include <string.h>
-#include "wx/anidecod.h"
// static
wxCURHandler wxANIDecoder::sm_handler;
-
-
//---------------------------------------------------------------------------
// wxANIFrameInfo
//---------------------------------------------------------------------------
int m_imageIndex;
};
-#include <wx/arrimpl.cpp> // this is a magic incantation which must be done!
-WX_DEFINE_OBJARRAY(wxImageArray);
-
-#include <wx/arrimpl.cpp> // this is a magic incantation which must be done!
-WX_DEFINE_OBJARRAY(wxANIFrameInfoArray);
-
+#include "wx/arrimpl.cpp" // this is a magic incantation which must be done!
+WX_DEFINE_OBJARRAY(wxImageArray)
+#include "wx/arrimpl.cpp" // this is a magic incantation which must be done!
+WX_DEFINE_OBJARRAY(wxANIFrameInfoArray)
//---------------------------------------------------------------------------
return m_info[frame].m_delay;
}
+wxColour wxANIDecoder::GetTransparentColour(size_t frame) const
+{
+ size_t idx = m_info[frame].m_imageIndex;
+
+ if (!m_images[idx].HasMask())
+ return wxNullColour;
+
+ return wxColour(m_images[idx].GetMaskRed(),
+ m_images[idx].GetMaskGreen(),
+ m_images[idx].GetMaskBlue());
+}
+
//---------------------------------------------------------------------------
// ANI reading and decoding
m_szAnimation.GetHeight() == 0)
m_szAnimation = wxSize(m_images[0].GetWidth(), m_images[0].GetHeight());
- return m_szAnimation!=wxDefaultSize;
+ return m_szAnimation != wxDefaultSize;
}
-#endif // wxUSE_STREAMS && wxUSE_GIF
+#endif // wxUSE_STREAMS && wxUSE_ICO_CUR