BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Kalle

Pages: [1]
1
Discussion - EVE / Re: How to make a selected color transparent?
« on: June 18, 2021, 12:43:33 PM »
Attached is the PNG files.

I have stored the PNG files with black background and my custom font in the flash and then utilised:

Setup method
Code: [Select]
Gpu_CoCmd_FlashHelper_Init(phost);
Gpu_CoCmd_FlashHelper_SwitchFullMode(phost);
Gpu_CoCmd_FlashRead(phost, MEM_FONT_DIGITAL_MEDIUM, 45056, 192);
Gpu_CoCmd_FlashRead(phost, MEM_ICON_GEAR, 45248, 2048);


Render image
Code: [Select]
Gpu_CoCmd_Dlstart(_phost);
App_WrCoCmd_Buffer(_phost, SCREEN_BG_PRIMARY_COLOR);
App_WrCoCmd_Buffer(_phost, CLEAR(1, 1, 1));

Gpu_CoCmd_SetFont2(_phost, 2, MEM_FONT_DIGITAL_MEDIUM, 1);
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(200 * 16, 135 * 16));

App_WrCoCmd_Buffer(_phost, DISPLAY());
App_Flush_Co_Buffer(_phost);
Gpu_CoCmd_Swap(_phost);
Gpu_Hal_WaitCmdfifo_empty(_phost);

I need to load my custom font to be able to make my black background transparent for my icons.

2
Discussion - EVE / Re: How to make a selected color transparent?
« on: June 03, 2021, 08:48:22 PM »
I have already tried to convert them to both ASTC and ARGB1555, saved them in flash and load it into RAM_G. The transparent background is preserved in both cases, but the transition between background and foreground is not smooth.

As I wrote in my first post, the transition between background and foreground will be much smoother if I save it with a black background, but to get the black background transparent I have to run the command:
Code: [Select]
EVE_cmd_setfont2_burst(12,MEM_FONT,0);
If you look at the png image that is generated when you generate custom fonts in EBA, it also has a black background, so there must be a relationship between setfont2 command and that the black background becomes transparent?

Attached is the EBA converted image.

3
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.

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.

Pages: [1]