void wxBitmapRefData::Free()
{
- wxASSERT_MSG( !m_pSelectedInto,
- wxT("deleting bitmap still selected into wxMemoryDC") );
-
+ if ( m_pSelectedInto )
+ {
+ wxLogLastError("GpiDeleteBitmap(hbitmap)");
+ }
if (m_hBitmap)
{
if (!::GpiDeleteBitmap((HBITMAP)m_hBitmap))
//
if (rImage.HasMask())
{
- hBmp = ::GpiCreateBitmap( hPS
- ,&vHeader
- ,0L
- ,NULL
- ,NULL
- );
- memset(&vHeader, '\0', sizeof(BITMAPINFOHEADER2));
- hBmpOld = ::GpiSetBitmap(hPS, hBmp);
-
vHeader.cbFix = sizeof(BITMAPINFOHEADER2);
vHeader.cx = nWidth;
vHeader.cy = nHeight;
,NULL
,NULL
);
+ hBmpOld = ::GpiSetBitmap(hPS, hBmp);
if (nNumDIB == 1)
nHeight = nBmpHeight;
else
,NULL
,NULL
);
+ ::GpiSetBitmap(hPSMem, hBitmap);
lScans = ::GpiQueryBitmapBits( hPSMem
,0L
,(LONG)nHeight
}
ptbits += nPadding;
}
+ ::GpiSetBitmap(hPSMem, NULLHANDLE);
//
// Similarly, set data according to the possible mask bitmap
);
::GpiSetColor(hMemPS, OS2RGB(0, 0, 0));
::GpiSetBackColor(hMemPS, OS2RGB(255, 255, 255) );
+ ::GpiSetBitmap(hMemPS, hBitmap);
::GpiQueryBitmapBits( hPSMem
,0L
,(LONG)nHeight
,(PBYTE)lpBits
,&vDIBInfo
);
+ ::GpiSetBitmap(hMemPS, NULLHANDLE);
::GpiDestroyPS(hMemPS);
::DevCloseDC(hMemDC);
HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
POINTL vPoint[4] = { 0, 0, rRect.width, rRect.height,
- rRect.x, rRect.y
+ rRect.x, rRect.y,
rRect.x + rRect.width, rRect.y + rRect.height
};