]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bitmap.cpp
GetBoundingRect() is supposed to return the logical coordinates, even in !textOnly...
[wxWidgets.git] / src / gtk / bitmap.cpp
index 5899c2b1d1896f752636aacd7730d5a49302ce52..cb569d36472df747f90c01ec308f4b62c927b3f3 100644 (file)
@@ -346,7 +346,7 @@ bool wxBitmap::CreateFromXpm( const char **bits )
         M_BMPDATA->m_mask->m_bitmap = mask;
     }
 
-    gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
+    gdk_drawable_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
 
     M_BMPDATA->m_bpp = visual->depth;  // Can we get a different depth from create_from_xpm_d() ?
 
@@ -1262,7 +1262,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
         {
             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_gc_destroy( gc );
+            g_object_unref (G_OBJECT (gc));
         }
         else
         {
@@ -1273,7 +1273,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
             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 );
+            g_object_unref (G_OBJECT (gc));
         }
     }
 
@@ -1289,7 +1289,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
         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 );
+        g_object_unref (G_OBJECT (gc));
 
         ret.SetMask( mask );
     }
@@ -1339,7 +1339,7 @@ bool wxBitmap::LoadFile( const wxString &name, wxBitmapType type )
            M_BMPDATA->m_mask->m_bitmap = mask;
         }
 
-        gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
+        gdk_drawable_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
 
         M_BMPDATA->m_bpp = visual->depth;
     }