X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/533b005afddad05e3d126b5d3ad9227e8eb05701..5d88a6b5791728f13974db60b7105952157dae96:/src/gtk/bitmap.cpp diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index bc18293081..28ed8d1e56 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -304,9 +304,6 @@ wxBitmap wxBitmap::Rescale(int clipx, int clipy, int clipwidth, int clipheight, wxCHECK_MSG(Ok(), bmp, wxT("invalid bitmap")); - if (newx==M_BMPDATA->m_width && newy==M_BMPDATA->m_height) - return *this; - int width = wxMax(newx, 1); int height = wxMax(newy, 1); width = wxMin(width, clipwidth); @@ -336,7 +333,7 @@ wxBitmap wxBitmap::Rescale(int clipx, int clipy, int clipwidth, int clipheight, // images, but the only one which preserves sharp edges gdk_pixbuf_scale( pixbuf, pixbuf_scaled, - 0, 0, width, height, clipx, clipy, scale_x, scale_y, + 0, 0, width, height, -clipx, -clipy, scale_x, scale_y, GDK_INTERP_NEAREST); g_object_unref(pixbuf); @@ -353,7 +350,7 @@ wxBitmap wxBitmap::Rescale(int clipx, int clipy, int clipwidth, int clipheight, gdk_pixbuf_scale( pixbuf, pixbuf_scaled, - 0, 0, width, height, clipx, clipy, scale_x, scale_y, + 0, 0, width, height, -clipx, -clipy, scale_x, scale_y, GDK_INTERP_NEAREST); g_object_unref(pixbuf);