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);