Fix handling of wxSET, wxCLEAR and wxINVERT ROPs in wxMSW.
Avoid passing source HDC to MaskBlt() for these ROPs which only use the destination HDC as they produce garbage instead of just ignoring the source in if it's non-NULL. Closes #2047. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -619,6 +619,7 @@ wxMSW:
|
|||||||
- Fix display of bitmaps with alpha in wxStaticBitmap (Artur Wieczorek).
|
- Fix display of bitmaps with alpha in wxStaticBitmap (Artur Wieczorek).
|
||||||
- Fix wxClientDC::Clear() for scrolled windows (Artur Wieczorek).
|
- Fix wxClientDC::Clear() for scrolled windows (Artur Wieczorek).
|
||||||
- Make wxPrinterDC::DrawIcon() actually work (Artur Wieczorek).
|
- Make wxPrinterDC::DrawIcon() actually work (Artur Wieczorek).
|
||||||
|
- Fix handling of wxSET, wxCLEAR and wxINVERT in wxDC (Artur Wieczorek).
|
||||||
|
|
||||||
wxOSX:
|
wxOSX:
|
||||||
|
|
||||||
|
@@ -2186,7 +2186,7 @@ bool wxMSWDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HDC hdcSrc = GetHdcOf(*implSrc);
|
HDC hdcSrc = GetHdcOf(*implSrc);
|
||||||
|
|
||||||
// if either the source or destination has alpha channel, we must use
|
// if either the source or destination has alpha channel, we must use
|
||||||
// AlphaBlt() as other function don't handle it correctly
|
// AlphaBlt() as other function don't handle it correctly
|
||||||
@@ -2243,6 +2243,16 @@ bool wxMSWDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Most of the operations involve the source or the pattern, but a few of
|
||||||
|
// them (and only those few, no other are possible) only use destination
|
||||||
|
// HDC. For them we must not give a valid source HDC to MaskBlt() as it
|
||||||
|
// still uses it, somehow, and the result is garbage.
|
||||||
|
if ( dwRop == BLACKNESS || dwRop == WHITENESS ||
|
||||||
|
dwRop == DSTINVERT || dwRop == DSTCOPY )
|
||||||
|
{
|
||||||
|
hdcSrc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
if (useMask)
|
if (useMask)
|
||||||
|
Reference in New Issue
Block a user