From 70dcce790678c6c68f152ce32ed9d4206fd84206 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 22 Aug 2004 18:32:55 +0000 Subject: [PATCH] set mask when converting pixbuf to pixmap git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/bitmap.cpp | 4 +++- src/gtk1/bitmap.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index ea76fd0e34..10b8e7063d 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -1444,9 +1444,11 @@ GdkPixmap *wxBitmap::GetPixmap() const // create the pixmap on the fly if we use Pixbuf representation: if (HasPixbuf() && !HasPixmap()) { + delete M_BMPDATA->m_mask; + M_BMPDATA->m_mask = new wxMask(); gdk_pixbuf_render_pixmap_and_mask(M_BMPDATA->m_pixbuf, &M_BMPDATA->m_pixmap, - NULL /*mask*/, + &M_BMPDATA->m_mask->m_bitmap, 128 /*threshold*/); } #endif // __WXGTK20__ diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index ea76fd0e34..10b8e7063d 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -1444,9 +1444,11 @@ GdkPixmap *wxBitmap::GetPixmap() const // create the pixmap on the fly if we use Pixbuf representation: if (HasPixbuf() && !HasPixmap()) { + delete M_BMPDATA->m_mask; + M_BMPDATA->m_mask = new wxMask(); gdk_pixbuf_render_pixmap_and_mask(M_BMPDATA->m_pixbuf, &M_BMPDATA->m_pixmap, - NULL /*mask*/, + &M_BMPDATA->m_mask->m_bitmap, 128 /*threshold*/); } #endif // __WXGTK20__ -- 2.50.0