set mask when converting pixbuf to pixmap

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-08-22 18:32:55 +00:00
parent 87e53e2a94
commit 70dcce7906
2 changed files with 6 additions and 2 deletions

View File

@@ -1444,9 +1444,11 @@ GdkPixmap *wxBitmap::GetPixmap() const
// create the pixmap on the fly if we use Pixbuf representation: // create the pixmap on the fly if we use Pixbuf representation:
if (HasPixbuf() && !HasPixmap()) if (HasPixbuf() && !HasPixmap())
{ {
delete M_BMPDATA->m_mask;
M_BMPDATA->m_mask = new wxMask();
gdk_pixbuf_render_pixmap_and_mask(M_BMPDATA->m_pixbuf, gdk_pixbuf_render_pixmap_and_mask(M_BMPDATA->m_pixbuf,
&M_BMPDATA->m_pixmap, &M_BMPDATA->m_pixmap,
NULL /*mask*/, &M_BMPDATA->m_mask->m_bitmap,
128 /*threshold*/); 128 /*threshold*/);
} }
#endif // __WXGTK20__ #endif // __WXGTK20__

View File

@@ -1444,9 +1444,11 @@ GdkPixmap *wxBitmap::GetPixmap() const
// create the pixmap on the fly if we use Pixbuf representation: // create the pixmap on the fly if we use Pixbuf representation:
if (HasPixbuf() && !HasPixmap()) if (HasPixbuf() && !HasPixmap())
{ {
delete M_BMPDATA->m_mask;
M_BMPDATA->m_mask = new wxMask();
gdk_pixbuf_render_pixmap_and_mask(M_BMPDATA->m_pixbuf, gdk_pixbuf_render_pixmap_and_mask(M_BMPDATA->m_pixbuf,
&M_BMPDATA->m_pixmap, &M_BMPDATA->m_pixmap,
NULL /*mask*/, &M_BMPDATA->m_mask->m_bitmap,
128 /*threshold*/); 128 /*threshold*/);
} }
#endif // __WXGTK20__ #endif // __WXGTK20__