cleanup of raw access to bitmaps:
1. remove UseAlpha() on platforms that don't need it and call it automatically from ~wxPixelData instead of requiring explicit call; deprecate wxPixelData::UseAlpha() 2. don't call UngetRawData() if GetRawData() failed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -917,19 +917,6 @@ bool wxBitmap::HasAlpha() const
|
||||
gdk_pixbuf_get_has_alpha(M_BMPDATA->m_pixbuf);
|
||||
}
|
||||
|
||||
void wxBitmap::UseAlpha()
|
||||
{
|
||||
GdkPixbuf* pixbuf = GetPixbuf();
|
||||
// add alpha if necessary
|
||||
if (!gdk_pixbuf_get_has_alpha(pixbuf))
|
||||
{
|
||||
M_BMPDATA->m_pixbuf = NULL;
|
||||
AllocExclusive();
|
||||
M_BMPDATA->m_pixbuf = gdk_pixbuf_add_alpha(pixbuf, false, 0, 0, 0);
|
||||
g_object_unref(pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
wxObjectRefData* wxBitmap::CreateRefData() const
|
||||
{
|
||||
return new wxBitmapRefData;
|
||||
|
Reference in New Issue
Block a user