]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bitmap.cpp
VC++ 5 compatibility
[wxWidgets.git] / src / gtk / bitmap.cpp
index ea76fd0e340a0045a4b7a742c66dae2df37c1348..8a73768b7d3a68e103d219be76e93b5d4d6158e3 100644 (file)
@@ -16,8 +16,8 @@
 
 #include "wx/defs.h"
 
-#include "wx/palette.h"
 #include "wx/bitmap.h"
+#include "wx/palette.h"
 #include "wx/icon.h"
 #include "wx/filefn.h"
 #include "wx/image.h"
@@ -39,7 +39,7 @@
     #include <gdk/gdkrgb.h>
 #endif // GTK+ 2.0/1.2
 
-#include <math.h>
+#include "wx/math.h"
 
 extern void gdk_wx_draw_bitmap     (GdkDrawable  *drawable,
                           GdkGC               *gc,
@@ -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__