#ifdef __WXGTK20__
#include <gdk/gdkimage.h>
#else // GTK+ 1.2
- // VZ: is this still needed? seems to compile fine without it...
- #if (GTK_MINOR_VERSION > 0)
- #include <gdk/gdkrgb.h>
- #endif
+ #include <gdk/gdkrgb.h>
#endif // GTK+ 2.0/1.2
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
}
gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
-
- M_BMPDATA->m_bpp = visual->depth; // ?
+
+ M_BMPDATA->m_bpp = visual->depth; // Can we get a different depth from create_from_xpm_d() ?
return TRUE;
}
SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) );
SetDepth( 1 );
-
+
GdkVisual *visual = wxTheApp->GetGdkVisual();
// Create picture image
int bpp = visual->depth;
SetDepth( bpp );
-
+
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
if (bpp < 8) bpp = 8;
image.Create( GetWidth(), GetHeight() );
char unsigned *data = image.GetData();
-
+
if (!data)
{
gdk_image_destroy( gdk_image );
}
wxBitmap::wxBitmap( const wxBitmap& bmp )
+ : wxGDIObject()
{
Ref( bmp );
}