]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
Don't use wxDC in header
[wxWidgets.git] / src / common / image.cpp
index 6dddaefb3c764b236070e6d788f0981adf790106..4fb2b0c2548c79b7b698390783e09122580c6ea3 100644 (file)
@@ -1857,6 +1857,17 @@ void wxImage::InitAlpha()
     }
 }
 
+void wxImage::ClearAlpha()
+{
+    wxCHECK_RET( HasAlpha(), wxT("image already doesn't have an alpha channel") );
+
+    if ( !M_IMGDATA->m_staticAlpha )
+        free( M_IMGDATA->m_alpha );
+
+    M_IMGDATA->m_alpha = NULL;
+}
+
+
 // ----------------------------------------------------------------------------
 // mask support
 // ----------------------------------------------------------------------------