Fix drawing wxBitmap with both alpha channel and mask

For 32 bpp wxBitmap with both alpha channel and mask we have to apply mask on our own while drawing the bitmap because MaskBlt() API doesn't work properly with 32 bpp RGBA bitmaps. To do so we need to create a temporary bitmap with copy of original RGB data and with alpha channel being a superposition of the original alpha values and the mask.

See #18498.
This commit is contained in:
Artur Wieczorek
2019-09-12 23:54:00 +02:00
parent b2cdcb6824
commit 2d15218c9d
4 changed files with 82 additions and 3 deletions

View File

@@ -205,6 +205,9 @@ public:
// values in its alpha channel.
void MSWUpdateAlpha();
// Blend mask with alpha channel and remove the mask
void MSWBlendMaskWithAlpha();
public:
#if WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_INLINE(void SetHBITMAP(WXHBITMAP bmp), SetHandle((WXHANDLE)bmp); )