]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/anidecod.cpp
Don't use the window position as the x offset when painting the full
[wxWidgets.git] / src / common / anidecod.cpp
index e3b5ba4718755c0981ca4837323485dd1df082dc..7d502ae52a4ed898c83572ad25ed848422421725 100644 (file)
@@ -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