added debug checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2303,7 +2303,7 @@ static void
|
|||||||
wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
|
wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
|
||||||
{
|
{
|
||||||
// get the destination DC pixels
|
// get the destination DC pixels
|
||||||
wxBitmap bmpDst(w, h, 32);
|
wxBitmap bmpDst(w, h, 32 /* force creating RGBA DIB */);
|
||||||
MemoryHDC hdcMem;
|
MemoryHDC hdcMem;
|
||||||
SelectInHDC select(hdcMem, GetHbitmapOf(bmpDst));
|
SelectInHDC select(hdcMem, GetHbitmapOf(bmpDst));
|
||||||
|
|
||||||
@@ -2316,6 +2316,9 @@ wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
|
|||||||
wxRawBitmapData dataDst(bmpDst),
|
wxRawBitmapData dataDst(bmpDst),
|
||||||
dataSrc(bmpSrc);
|
dataSrc(bmpSrc);
|
||||||
|
|
||||||
|
wxCHECK_RET( dataDst && dataSrc,
|
||||||
|
_T("failed to get raw data in wxAlphaBlend") );
|
||||||
|
|
||||||
wxRawBitmapIterator pDst(dataDst),
|
wxRawBitmapIterator pDst(dataDst),
|
||||||
pSrc(dataSrc);
|
pSrc(dataSrc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user