new template-based more flexible and hopefully more efficient raw bitmap implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2313,19 +2313,19 @@ wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
|
||||
}
|
||||
|
||||
// combine them with the source bitmap using alpha
|
||||
wxRawBitmapData dataDst(bmpDst),
|
||||
dataSrc(bmpSrc);
|
||||
wxAlphaPixelData dataDst(bmpDst),
|
||||
dataSrc(bmpSrc);
|
||||
|
||||
wxCHECK_RET( dataDst && dataSrc,
|
||||
_T("failed to get raw data in wxAlphaBlend") );
|
||||
|
||||
wxRawBitmapIterator pDst(dataDst),
|
||||
pSrc(dataSrc);
|
||||
wxAlphaPixelData::Iterator pDst(dataDst),
|
||||
pSrc(dataSrc);
|
||||
|
||||
for ( int y = 0; y < h; y++ )
|
||||
{
|
||||
wxRawBitmapIterator pDstRowStart = pDst,
|
||||
pSrcRowStart = pSrc;
|
||||
wxAlphaPixelData::Iterator pDstRowStart = pDst,
|
||||
pSrcRowStart = pSrc;
|
||||
|
||||
for ( int x = 0; x < w; x++ )
|
||||
{
|
||||
@@ -2343,8 +2343,8 @@ wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc)
|
||||
|
||||
pDst = pDstRowStart;
|
||||
pSrc = pSrcRowStart;
|
||||
pDst.OffsetY(1);
|
||||
pSrc.OffsetY(1);
|
||||
pDst.OffsetY(dataDst, 1);
|
||||
pSrc.OffsetY(dataSrc, 1);
|
||||
}
|
||||
|
||||
// and finally blit them back to the destination DC
|
||||
|
Reference in New Issue
Block a user