cancel
Showing results for 
Search instead for 
Did you mean: 

Progress Widgets with transparent background

SaschaK
Associate

Hi all,

For my GUI I need several circle and box progress widgets in different sizes that have a transparent background, e.g. only showing the actual progress "line" and nothing else. So far I achieved this by simply choosing a transparent PNG as background image and that works fine. However, due to the many widgets and sizes I use quite a lot of transparent PNGs which start to add up in flash size.

Having PNGs using space for practically not displaying anything feels wrong, but It seems like the progress widgets only can take images as backgrounds and actually do need an image (there is obvious option to leave it blank). 

Is there a more flash space efficient way to achieve circle progress and boxes with transparent (or no) background?

Thanks in advance!

Sascha

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

Hello @SaschaK ,

 

In the Image tab of TouchGFX Designer, you can choose to compress your assets:

GaetanGodart_0-1742810797146.png

Since you are using fully transparent background, the compression will be very effective!

 

Another way of achieving your desired result would be to create a new class inheriting from the progress widget class and to modify it to not have a background image.

 

If this comment answers your question, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

5 REPLIES 5
ahsrabrifat
Associate III

Most GUI libraries, such as LVGL (LittlevGL), LVGL (LVGL), or TFT_eSPI, allow you to draw shapes programmatically using their API. You can draw the circular progress using arc drawing functions.

That is true, just thought I could take an easier approach with the existing progress widgets. Seems like an unnecessary feature to need a background picture. 

GaetanGodart
ST Employee

Hello @SaschaK ,

 

In the Image tab of TouchGFX Designer, you can choose to compress your assets:

GaetanGodart_0-1742810797146.png

Since you are using fully transparent background, the compression will be very effective!

 

Another way of achieving your desired result would be to create a new class inheriting from the progress widget class and to modify it to not have a background image.

 

If this comment answers your question, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi @GaetanGodart,

thanks for the tip with the compression. That made a huge impact. All the transparent PNGs have been reduced down to 0.5-5% of their original size! I am more than happy with that result.

 

Just out of interest, in order to modify the existing widget, is the source code openly available somewhere?

Regards

Sascha

Hello @SaschaK ,

 

Not all of it, but the widgets are.
You can find them in a TouchGFX project folder here : ProjectName\Appli\Middlewares\ST\touchgfx\framework

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)