X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/783da8450c15fec48691411d492ad2246cba15d7..cb928fe350ca0c093642133cf0de24d1b064aa72:/src/gtk/bitmap.cpp?ds=sidebyside diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index d6ccd87c4c..38a044b1aa 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -414,11 +414,23 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, for (int h = 0; h < height; h++) { char outbyte = 0; + int old_x = -1; + guint32 old_pixval; - for (int w=0; wGetBitmap(), 0, 0, GetWidth(), GetHeight() ); @@ -468,10 +479,22 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, for (int h = 0; h < height; h++) { char outbyte = 0; + int old_x = -1; + guint32 old_pixval; - for (int w=0; wm_bitmap = gdk_bitmap_create_from_data( wxGetRootWindow()->window, (gchar *) dst, width, height ); bmp.SetMask(mask); - + free( dst ); gdk_image_destroy( img ); } @@ -1122,6 +1144,11 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const else { GdkGC *gc = gdk_gc_new( ret.GetBitmap() ); + GdkColor col; + col.pixel = 0xFFFFFF; + gdk_gc_set_foreground( gc, &col ); + col.pixel = 0; + gdk_gc_set_background( gc, &col ); gdk_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height ); gdk_gc_destroy( gc ); } @@ -1132,7 +1159,12 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const mask->m_bitmap = gdk_pixmap_new( wxGetRootWindow()->window, rect.width, rect.height, 1 ); GdkGC *gc = gdk_gc_new( mask->m_bitmap ); - gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height ); + GdkColor col; + col.pixel = 0xFFFFFF; + gdk_gc_set_foreground( gc, &col ); + col.pixel = 0; + gdk_gc_set_background( gc, &col ); + gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, rect.x, rect.y, 0, 0, rect.width, rect.height ); gdk_gc_destroy( gc ); ret.SetMask( mask );