]> git.saurik.com Git - wxWidgets.git/commitdiff
set mask when converting pixbuf to pixmap
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 22 Aug 2004 18:32:55 +0000 (18:32 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 22 Aug 2004 18:32:55 +0000 (18:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/bitmap.cpp
src/gtk1/bitmap.cpp

index ea76fd0e340a0045a4b7a742c66dae2df37c1348..10b8e7063d5d2f783f4239fbf0b1c60e9118f2d2 100644 (file)
@@ -1444,9 +1444,11 @@ GdkPixmap *wxBitmap::GetPixmap() const
     // create the pixmap on the fly if we use Pixbuf representation:
     if (HasPixbuf() && !HasPixmap())
     {
     // 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,
         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__
                                           128 /*threshold*/);
     }
 #endif // __WXGTK20__
index ea76fd0e340a0045a4b7a742c66dae2df37c1348..10b8e7063d5d2f783f4239fbf0b1c60e9118f2d2 100644 (file)
@@ -1444,9 +1444,11 @@ GdkPixmap *wxBitmap::GetPixmap() const
     // create the pixmap on the fly if we use Pixbuf representation:
     if (HasPixbuf() && !HasPixmap())
     {
     // 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,
         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__
                                           128 /*threshold*/);
     }
 #endif // __WXGTK20__