Add wxImage::ClearAlpha().
This simple method can be used to remove alpha channel from the image. See #10915. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user