git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20210
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
{
// get the destination DC pixels
wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
{
// get the destination DC pixels
- wxBitmap bmpDst(w, h, 32);
+ wxBitmap bmpDst(w, h, 32 /* force creating RGBA DIB */);
MemoryHDC hdcMem;
SelectInHDC select(hdcMem, GetHbitmapOf(bmpDst));
MemoryHDC hdcMem;
SelectInHDC select(hdcMem, GetHbitmapOf(bmpDst));
wxRawBitmapData dataDst(bmpDst),
dataSrc(bmpSrc);
wxRawBitmapData dataDst(bmpDst),
dataSrc(bmpSrc);
+ wxCHECK_RET( dataDst && dataSrc,
+ _T("failed to get raw data in wxAlphaBlend") );
+
wxRawBitmapIterator pDst(dataDst),
pSrc(dataSrc);
wxRawBitmapIterator pDst(dataDst),
pSrc(dataSrc);