Make raw pixel access work even with DDBs under MSW.
This is inefficient, because we need to copy pixels to and from them, but better than silently doing nothing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -242,6 +242,8 @@ void wxBitmapRefData::Free()
|
||||
{
|
||||
wxLogLastError(wxT("DeleteObject(hbitmap)"));
|
||||
}
|
||||
|
||||
m_hBitmap = 0;
|
||||
}
|
||||
|
||||
wxDELETE(m_bitmapMask);
|
||||
@@ -1329,7 +1331,8 @@ void wxBitmap::UngetRawData(wxPixelDataBase& dataBase)
|
||||
wxDIB *dib = GetBitmapData()->m_dib;
|
||||
GetBitmapData()->m_dib = NULL;
|
||||
|
||||
// TODO: convert
|
||||
GetBitmapData()->Free();
|
||||
GetBitmapData()->CopyFromDIB(*dib);
|
||||
|
||||
delete dib;
|
||||
}
|
||||
|
Reference in New Issue
Block a user