gdk_gc_destroy -> gdk_gc_unref -> g_object_unref

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2006-04-04 15:06:55 +00:00
parent 4e84399d42
commit e6e9293af3

View File

@@ -1262,7 +1262,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
{ {
GdkGC *gc = gdk_gc_new( ret.GetPixmap() ); GdkGC *gc = gdk_gc_new( ret.GetPixmap() );
gdk_draw_drawable( ret.GetPixmap(), gc, GetPixmap(), rect.x, rect.y, 0, 0, rect.width, rect.height ); gdk_draw_drawable( ret.GetPixmap(), gc, GetPixmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
gdk_gc_destroy( gc ); g_object_unref (G_OBJECT (gc));
} }
else else
{ {
@@ -1273,7 +1273,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
col.pixel = 0; col.pixel = 0;
gdk_gc_set_background( gc, &col ); 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_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
gdk_gc_destroy( gc ); g_object_unref (G_OBJECT (gc));
} }
} }
@@ -1289,7 +1289,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
col.pixel = 0; col.pixel = 0;
gdk_gc_set_background( gc, &col ); 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_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 ); g_object_unref (G_OBJECT (gc));
ret.SetMask( mask ); ret.SetMask( mask );
} }