Skip to main content
Klemens_Pleiner_STE
Associate II
September 2, 2021
Question

Box with alpha does not work anymore

  • September 2, 2021
  • 23 replies
  • 4627 views

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

This topic has been closed for replies.

23 replies

Romain DIELEMAN
ST Employee
September 6, 2021

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

Klemens_Pleiner_STE
Associate II
September 10, 2021

Hi!

Thank you for investigating! We are working on custom hardware. I was on vacation the last few days, so I could not answer.

Do you still want to see screenshots / photos of our project? MLook.1 already shared another project with the same issue yesterday...

KR, Klemens

PS: I already created a workaround with an Image widget instead of the Box widget. The Image widget contains an image with an alpha-colour and that does the trick for me.

PPS: Our display uses an RGB888 framebuffer. But we are using L8ARGB bitmaps that are drawn into the framebuffer on an STM32L4R9 using ChromART and not the generated STM32L4R9 Chromart class but the one based on the one supplied in https://community.st.com/s/question/0D50X0000BdgJZkSQM/is-the-l8argb8888-image-format-supported-for-shapes-widget-if-not-will-it-be-in-the-future

PPPS: I just read the last posts down below (they were not visible when I opened this discussion the first time today -- don't ask me why).

We are using STM32Cube_FW_L4_V1.17.0 in our project. And I think this is the latest version. STM32CubeIDE does NOT ask to update the project when I open the ioc file.

Maybe our problems are caused by the usage of our ChromART class instead of the generated one? (Ours causes less CPU usage when having many L8ARGB bitmaps on the screen with much scrolling going on compared to the generated class.)

Romain DIELEMAN
ST Employee
September 10, 2021

Hi,

Alpha works in my case when I start a project with the TBS for the STM32L4R9dk board using the STM32Cube_FW_L4_V1.17.0 FW package which is the latest one available. MLook.1's issue was due to that FW package so your issue may be different.

The ChromART class you use is 2 years old so using the generated one could be something to investigate for sure. But the box widget does not use L8ARGB anyway, the image widget does however so it is good sign that it works in your project.

/Romain

MLook.1
Associate II
September 7, 2021

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)

Romain DIELEMAN
ST Employee
September 7, 2021

Hi,

Could you share your project ?

/Romain

MLook.1
Associate II
September 7, 2021

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.

HNguy.21
Associate II
September 29, 2021

Hi,

I met the same issue here, changed HAL to V1.9, and nothing change.

Have anyone solved this bug yet?

Romain DIELEMAN
ST Employee
September 29, 2021

Hi,

What do you mean by changing HAL to V1.9 ? Are you working on a custom board or from a TBS available in TouchGFX Designer ? Did you open the project in STM32CubeMX and regenerate code with the latest FW package ?

/Romain

HNguy.21
Associate II
September 29, 2021

I changing to HAL to V1.9 manually used a custom board.

On STM32CubeMX, my project is too old to run CubeMX V6.3.0.

the version CubeMX of my project is V5.4.0.

HNguy.21
Associate II
October 11, 2021

Hi,

Mitigate from 4.13 to 4.16.1, a box with alpha is working.

However, version 4.17 isn't.

I want to use the latest version of TouchGFX Design now, can you help me with the issue :(

Romain DIELEMAN
ST Employee
October 12, 2021

Hi,

As explained in the previous messages, did you try to open the ioc file in STM32CubeMX and generate code again ?

/Romain

HNguy.21
Associate II
October 13, 2021

I tried, and it has a little complicated. Can you show me the diff in generate code of alpha bleeding in TouchGFX 4.17?