Anser,
The class changes are exactly the ones that I commented you at the beginning of this thread:
use ABPaint() instead of DrawMasked() in Method Paint(). Thats all
@04,14 BITMAP oBmp SIZE 43,55 of oFolder:aDialogs[1] RESOURCE "User76x112"
Just modify Class TBitmap Method Paint() to use ABPaint()
PalBmpDraw( ::hDC, ::nX, ::nY, ::hBitmap, ::hPalette,;
Super:nWidth(), Super:nHeight(),, ::lTransparent, ::nClrPane )
TransBmp( ::hBitmap, ::nWidth(), ::nHeight(), nZeroZeroClr, ::hDC,;
::nX, ::nY, ::nWidth(), ::nHeight() )
@04,14 BITMAP oBmp SIZE 43,55 of oFolder:aDialogs[1] RESOURCE "User76x112"
oBmp:bPainted:={ || ABPaint( oBmp:hDC, 0, 0, oBmp:hBitmap, 220 )}
IF ! ::lBmpAlpha // New Data .T. or .F.
TransBmp( ::hBitmap, ::nWidth(), ::nHeight(), nZeroZeroClr, ::hDC,;
::nX, ::nY, Super:nWidth(), Super:nHeight() )
Else
ABPaint( ::hDC, ::nX, ::nY, ::hBitmap, 220 )
Endif
IF ! ::lBmpAlpha // New Data .T. or .F.
PalBmpDraw( ::hDC, ::nX, ::nY, ::hBitmap, ::hPalette,;
::nWidth(), ::nHeight(),, ::lTransparent, ::nClrPane )
Else
ABPaint( ::hDC, ::nX, ::nY, ::hBitmap, 220 )
Endif
Antonio Linares wrote:Wouldn't it better if we could automatically detect if the bitmap has an alpha channel into it and automatically call the proper painting routine ?
Antonio Linares wrote:Wouldn't it better if we could automatically detect if the bitmap has an alpha channel into it and automatically call the proper painting routine ?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 31 guests