add wxImage::SetType() and use it in animation decoders (#9639)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1468,6 +1468,16 @@ wxBitmapType wxImage::GetType() const
|
||||
return M_IMGDATA->m_type;
|
||||
}
|
||||
|
||||
void wxImage::SetType(wxBitmapType type)
|
||||
{
|
||||
wxCHECK_RET( IsOk(), "must create the image before setting its type");
|
||||
|
||||
// type can be wxBITMAP_TYPE_INVALID to reset the image type to default
|
||||
wxASSERT_MSG( type != wxBITMAP_TYPE_MAX, "invalid bitmap type" );
|
||||
|
||||
M_IMGDATA->m_type = type;
|
||||
}
|
||||
|
||||
long wxImage::XYToIndex(int x, int y) const
|
||||
{
|
||||
if ( Ok() &&
|
||||
|
Reference in New Issue
Block a user