Semi-Transparent controls

ddahan

Member
Licensed User
Longtime User
Hi ,
I'm trying to have semi-transparent ImageButton but have some difficulties.
I found that using a PNG image format with alpha channel is the most promising approach.
There is inconsistency that I cannot resolve - The ImageButton is semi-transparent in the desktop environment but is solid (not semi-transparent) in the device screen.
I have attached a simple example.
I'll appreciate your advice.

thanks,
David.
 

agraham

Expert
Licensed User
Longtime User

agraham

Expert
Licensed User
Longtime User
In a few days I'll post an update to ImageLibEx than can handle pixel level alpha. At the moment it supports constant alpha blend by the BitmapEx method.

AlphaBlend(src, srcrectangle, percent, destleft, desttop, transparent, transcolor)

where percent is the alpha for the source bitmap. I'll be adding

AlphaPixelBlend(src, srcrectangle, alphadata, destleft, desttop, transparent, transcolor)

where alphadata is a bitmap containing the alpha for source each pixel. It will need to be read from a file created on the desktop from a png file by a new Alpha object in the library. Full details will be in the help.
 
Top