X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14c0d834663779aaafeb80370c9f06c7178f020c..db71eb0640221199170ac9ea83371c2d467fa456:/src/common/anidecod.cpp diff --git a/src/common/anidecod.cpp b/src/common/anidecod.cpp index e3b5ba4718..7d502ae52a 100644 --- a/src/common/anidecod.cpp +++ b/src/common/anidecod.cpp @@ -14,7 +14,7 @@ #pragma hdrstop #endif -#if wxUSE_STREAMS && wxUSE_GIF +#if wxUSE_STREAMS && wxUSE_ICO_CUR #include "wx/anidecod.h" @@ -96,6 +96,18 @@ long wxANIDecoder::GetDelay(size_t frame) const 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 @@ -330,4 +342,4 @@ bool wxANIDecoder::Load( wxInputStream& stream ) return m_szAnimation != wxDefaultSize; } -#endif // wxUSE_STREAMS && wxUSE_GIF +#endif // wxUSE_STREAMS && wxUSE_ICO_CUR