X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6db34764d7ba8ea3c221b3e302d26071af944f6e..d6c69b17723c42d5114a464027fa307cabc66190:/src/gtk1/bitmap.cpp diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index ea76fd0e34..8a73768b7d 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -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 #endif // GTK+ 2.0/1.2 -#include +#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__