From 17f504ec9d688dc61bf10090a808a25ba34c50af Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 1 Oct 2005 15:27:30 +0000 Subject: [PATCH] fix the size of the created subbitmap git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/bitmap.cpp | 2 +- src/gtk1/bitmap.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 1ea0526a59..1a4c20bb62 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -1282,7 +1282,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const { GdkPixbuf *pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, gdk_pixbuf_get_has_alpha(GetPixbuf()), - 8, GetWidth(), GetHeight()); + 8, rect.width, rect.height); ret.SetPixbuf(pixbuf); gdk_pixbuf_copy_area(GetPixbuf(), rect.x, rect.y, rect.width, rect.height, diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 1ea0526a59..1a4c20bb62 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -1282,7 +1282,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const { GdkPixbuf *pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, gdk_pixbuf_get_has_alpha(GetPixbuf()), - 8, GetWidth(), GetHeight()); + 8, rect.width, rect.height); ret.SetPixbuf(pixbuf); gdk_pixbuf_copy_area(GetPixbuf(), rect.x, rect.y, rect.width, rect.height, -- 2.45.2