diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 5e2ffe883a..027a82e866 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1319,7 +1319,11 @@ void wxMSWDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool SelectInHDC select(hdcMem, GetHbitmapOf(bmp)); if ( AlphaBlt(this, x, y, width, height, 0, 0, width, height, hdcMem, bmp) ) + { + CalcBoundingBox(x, y); + CalcBoundingBox(x + bmp.GetWidth(), y + bmp.GetHeight()); return; + } } SET_STRETCH_BLT_MODE(GetHdc()); @@ -1426,6 +1430,9 @@ void wxMSWDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool ::SelectObject( memdc, hOldBitmap ); ::DeleteDC( memdc ); } + + CalcBoundingBox(x, y); + CalcBoundingBox(x + bmp.GetWidth(), y + bmp.GetHeight()); } void wxMSWDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y) @@ -2209,7 +2216,11 @@ bool wxMSWDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest, { if ( AlphaBlt(this, xdest, ydest, dstWidth, dstHeight, xsrc, ysrc, srcWidth, srcHeight, hdcSrc, bmpSrc) ) + { + CalcBoundingBox(xdest, ydest); + CalcBoundingBox(xdest + dstWidth, ydest + dstHeight); return true; + } } wxMask *mask = NULL; @@ -2486,6 +2497,12 @@ bool wxMSWDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest, } } + if ( success ) + { + CalcBoundingBox(xdest, ydest); + CalcBoundingBox(xdest + dstWidth, ydest + dstHeight); + } + return success; } @@ -2911,6 +2928,8 @@ void wxMSWDCImpl::DoGradientFillLinear (const wxRect& rect, ) ) { // skip call of the base class version below + CalcBoundingBox(rect.GetLeft(), rect.GetBottom()); + CalcBoundingBox(rect.GetRight(), rect.GetTop()); return; }