Disabled masked bitmaps under GTK 2.0 until I know
why they crash. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,10 +33,7 @@
|
|||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
#include <gdk/gdkimage.h>
|
#include <gdk/gdkimage.h>
|
||||||
#else // GTK+ 1.2
|
#else // GTK+ 1.2
|
||||||
// VZ: is this still needed? seems to compile fine without it...
|
#include <gdk/gdkrgb.h>
|
||||||
#if (GTK_MINOR_VERSION > 0)
|
|
||||||
#include <gdk/gdkrgb.h>
|
|
||||||
#endif
|
|
||||||
#endif // GTK+ 2.0/1.2
|
#endif // GTK+ 2.0/1.2
|
||||||
|
|
||||||
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
|
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
|
||||||
@@ -360,7 +357,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
|||||||
SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) );
|
SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) );
|
||||||
|
|
||||||
SetDepth( 1 );
|
SetDepth( 1 );
|
||||||
|
|
||||||
GdkVisual *visual = wxTheApp->GetGdkVisual();
|
GdkVisual *visual = wxTheApp->GetGdkVisual();
|
||||||
|
|
||||||
// Create picture image
|
// Create picture image
|
||||||
@@ -460,7 +457,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
|||||||
int bpp = visual->depth;
|
int bpp = visual->depth;
|
||||||
|
|
||||||
SetDepth( bpp );
|
SetDepth( bpp );
|
||||||
|
|
||||||
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
|
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
|
||||||
if (bpp < 8) bpp = 8;
|
if (bpp < 8) bpp = 8;
|
||||||
|
|
||||||
@@ -705,7 +702,7 @@ wxImage wxBitmap::ConvertToImage() const
|
|||||||
|
|
||||||
image.Create( GetWidth(), GetHeight() );
|
image.Create( GetWidth(), GetHeight() );
|
||||||
char unsigned *data = image.GetData();
|
char unsigned *data = image.GetData();
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
gdk_image_destroy( gdk_image );
|
gdk_image_destroy( gdk_image );
|
||||||
|
@@ -1010,6 +1010,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
{
|
{
|
||||||
use_bitmap = bitmap;
|
use_bitmap = bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
useMask = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* apply mask if any */
|
/* apply mask if any */
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
|
@@ -33,10 +33,7 @@
|
|||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
#include <gdk/gdkimage.h>
|
#include <gdk/gdkimage.h>
|
||||||
#else // GTK+ 1.2
|
#else // GTK+ 1.2
|
||||||
// VZ: is this still needed? seems to compile fine without it...
|
#include <gdk/gdkrgb.h>
|
||||||
#if (GTK_MINOR_VERSION > 0)
|
|
||||||
#include <gdk/gdkrgb.h>
|
|
||||||
#endif
|
|
||||||
#endif // GTK+ 2.0/1.2
|
#endif // GTK+ 2.0/1.2
|
||||||
|
|
||||||
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
|
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
|
||||||
@@ -360,7 +357,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
|||||||
SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) );
|
SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) );
|
||||||
|
|
||||||
SetDepth( 1 );
|
SetDepth( 1 );
|
||||||
|
|
||||||
GdkVisual *visual = wxTheApp->GetGdkVisual();
|
GdkVisual *visual = wxTheApp->GetGdkVisual();
|
||||||
|
|
||||||
// Create picture image
|
// Create picture image
|
||||||
@@ -460,7 +457,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
|||||||
int bpp = visual->depth;
|
int bpp = visual->depth;
|
||||||
|
|
||||||
SetDepth( bpp );
|
SetDepth( bpp );
|
||||||
|
|
||||||
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
|
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
|
||||||
if (bpp < 8) bpp = 8;
|
if (bpp < 8) bpp = 8;
|
||||||
|
|
||||||
@@ -705,7 +702,7 @@ wxImage wxBitmap::ConvertToImage() const
|
|||||||
|
|
||||||
image.Create( GetWidth(), GetHeight() );
|
image.Create( GetWidth(), GetHeight() );
|
||||||
char unsigned *data = image.GetData();
|
char unsigned *data = image.GetData();
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
gdk_image_destroy( gdk_image );
|
gdk_image_destroy( gdk_image );
|
||||||
|
@@ -1010,6 +1010,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
{
|
{
|
||||||
use_bitmap = bitmap;
|
use_bitmap = bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
useMask = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* apply mask if any */
|
/* apply mask if any */
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
|
Reference in New Issue
Block a user