cancel
Showing results for 
Search instead for 
Did you mean: 

Box with alpha does not work anymore

Klemens_Pleiner_STE
Associate III

Hi!

Since upgrading to TouchGFX 4.17, a box with an Alpha value does not work anymore. It just paints like as an opaque box, but not like a (semi-)transparent box.

Thus I tried to create my own widget that draws a rectangle with the following code:

HAL::getInstance()->lcd().fillRect(invalidatedAreaAbsolute, color, alpha);

But when alpha > 0, the rectangle is NOT (semi-)transparent, but opaque.

How can I get the alpha working with TouchGFX 4.17?

KR, Klemens

23 REPLIES 23
Romain DIELEMAN
ST Employee

Hum that is strange. Alpha does work in my projects. Are you working on a custom hardware or on one of ST development kit ?

Could you share photos/screenshots or your project so that we can have a better idea of what you are facing ?

/Romain

MLook.1
Associate III

Not an answer but I'm having the exact same issue on STM32H7B3 Discovery Kit on TouchGFX Designer 4.17, the simulator built from this has alpha but when running on the actual board it does not. This worked correctly on the board in 4.15 which I recently upgraded from.

Edit: only affecting box and box with border (circle and shape work correctly), for my use case I'm just dropping them on the canvas and setting the alpha there, I'm not creating them dynamically)

Hi,

Could you share your project ?

/Romain

It is a bit tricky because it is very large, I would make a simple demo but as you saw from my other ticket I can't make a new project at the moment. I will see if I have the modal window example I can update to 4.17 as I imagine it does the same. Alternatively take any of the examples and dump a semi-transparent box on the main screen.

OK two examples - I created a basic project in 4.15 the green box is transparent on the target board, I then updated to 4.17 the green box is opaque on the target board. The two ZIPs are named appropriately. Both are transparent in the simulator.

Looks like the 4.15 version went missing here it is.

When first running your project on 4.17 it didn't work as you explained. I then opened the ioc file with STM32CubeMX 6.3.0 and saw that it was not using the latest FW package v1.9.0 (and would not recognize that the one used, v1.6.0, was not the latest). So I changed that manually (by opening the ioc file with notepad++ and editing the FW package version), generated code and now it works. I will not lie, I do not understand why this old firmware package makes the alpha not work with TouchGFX 4.17... The latest version of the STM32H7B3dk TBS available in TouchGFX 4.17 uses the FW package 1.9.0 so use this one instead when we find a solution to your other issue :grinning_face_with_sweat: or make sure you use the latest FW package when starting a project with TouchGFX 4.15

/Romain

Thanks for that, I will try the same manual change you made is there a "proper" way to update/get the FW package (or should I just get it when installing TouchGFX Designer)?

Give it a try just in case as well