1
Discussion - EVE / How to make a selected color transparent?
« on: June 02, 2021, 12:24:33 PM »
I have created icons in PNG format with the background in black and the foreground in white color. I’m trying to make the black color transparent without success.
The funny thing is when I’m using the SetFont2 command to display my custom font, the black color gets transparent.
I have no problem to change the icon color.
I have read a lots of documentation and tried many different ways but cannot get it to work.
If I save the PNG file with a transparent background, it works, but it gets much better quality when I have the black background as the icon is only 32x32px.
The funny thing is when I’m using the SetFont2 command to display my custom font, the black color gets transparent.
I have no problem to change the icon color.
Code: [Select]
App_WrCoCmd_Buffer(phost, COLOR_RGB(255, 255, 64));
Gpu_CoCmd_SetBitmap(phost, MEM_ICON_GEAR, COMPRESSED_RGBA_ASTC_4x4_KHR, 32, 32);
App_WrCoCmd_Buffer(phost, BEGIN(BITMAPS));
App_WrCoCmd_Buffer(phost, VERTEX2F(_x * 16, _y * 16));
I have read a lots of documentation and tried many different ways but cannot get it to work.
If I save the PNG file with a transparent background, it works, but it gets much better quality when I have the black background as the icon is only 32x32px.