]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for uninitialized alpha being used to create mask, fixes wxMemoryDC with 32-bit...
authorPaul Cornett <paulcor@bullseye.com>
Mon, 1 Dec 2008 02:03:38 +0000 (02:03 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Mon, 1 Dec 2008 02:03:38 +0000 (02:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/bitmap.cpp

index 466cd688412e378d3c27bcce1366ce6b268cc0f4..1be0bb94a42ae9f8909f35cefc3c15906f7a59dc 100644 (file)
@@ -285,6 +285,9 @@ bool wxBitmap::Create( int width, int height, int depth )
     if (depth == 32)
     {
         SetPixbuf(gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, width, height), 32);
+        // must initialize alpha, otherwise GetPixmap()
+        // will create a mask out of garbage
+        gdk_pixbuf_fill(M_BMPDATA->m_pixbuf, 0x000000ff);
     } else
     if (depth == 24)
     {