From 781945ea412f924ad456adbf1830dc355fb573b6 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 30 Apr 2006 11:44:14 +0000 Subject: [PATCH] Patch 1476076 about negative wxImage size when copying (or something). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/image.cpp b/src/common/image.cpp index 9ce814f683..cc9834d4d6 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -708,6 +708,10 @@ wxImage wxImage::Size( const wxSize& size, const wxPoint& pos, wxRect subRect(pos.x, pos.y, width, height); wxRect finalRect(0, 0, size.GetWidth(), size.GetHeight()); + if (pos.x < 0) + finalRect.width -= pos.x; + if (pos.y < 0) + finalRect.height -= pos.y; subRect.Intersect(finalRect); -- 2.45.2