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
![Smile :-)](./images/smilies/icon_smile.gif)
Yes Mr.Antonio, you are right. Unfortunately in between I got into trouble with the wrong .RES file issue and I was totally confusedAnser,
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
Code: Select all
@04,14 BITMAP oBmp SIZE 43,55 of oFolder:aDialogs[1] RESOURCE "User76x112"
Which one should I replace with ABPaintJust modify Class TBitmap Method Paint() to use ABPaint()
Code: Select all
PalBmpDraw( ::hDC, ::nX, ::nY, ::hBitmap, ::hPalette,;
Super:nWidth(), Super:nHeight(),, ::lTransparent, ::nClrPane )
Code: Select all
TransBmp( ::hBitmap, ::nWidth(), ::nHeight(), nZeroZeroClr, ::hDC,;
::nX, ::nY, ::nWidth(), ::nHeight() )
Code: Select all
@04,14 BITMAP oBmp SIZE 43,55 of oFolder:aDialogs[1] RESOURCE "User76x112"
oBmp:bPainted:={ || ABPaint( oBmp:hDC, 0, 0, oBmp:hBitmap, 220 )}
Code: Select all
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
Code: Select all
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
If it is possible to identify Alphachannel automatically then that would be the best solution.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 ?
Definitely!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 ?