Fix drawing wxBitmap with mask

Under wxGTK+2, when wxBitmap has a wxMask but this mask shouldn't be used
in the actual drawing (useMask parameter in wxDC::DrawBitmap() is set to
false), we need to get bitmap data from the buffer with raw (original,
non-masked) data and not from the buffer containing data with mask applied.

Close #18498.
This commit is contained in:
Artur Wieczorek 2019-09-18 23:58:48 +02:00
parent f7247086c2
commit 919a4ec702

View File

@ -1155,7 +1155,7 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
}
}
else if (hasAlpha || pixmap == NULL)
pixbuf = bitmap.GetPixbuf();
pixbuf = useMask ? bitmap.GetPixbuf() : bitmap.GetPixbufNoMask();
if (isScaled)
{