use AlphaBlt() when blitting to a bitmap with alpha channel too (patch 991166)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1911,8 +1911,11 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
|
||||
WXMICROWIN_CHECK_HDC_RET(false)
|
||||
|
||||
// if either the source or destination has alpha channel, we must use
|
||||
// AlphaBlt() as other function don't handle it correctly
|
||||
const wxBitmap& bmpSrc = source->m_selectedBitmap;
|
||||
if ( bmpSrc.Ok() && bmpSrc.HasAlpha() )
|
||||
if ( bmpSrc.Ok() && (bmpSrc.HasAlpha() ||
|
||||
(m_selectedBitmap.Ok() && m_selectedBitmap.HasAlpha())) )
|
||||
{
|
||||
if ( AlphaBlt(GetHdc(), xdest, ydest, width, height,
|
||||
GetHdcOf(*source), bmpSrc) )
|
||||
|
Reference in New Issue
Block a user