2025-02-26 9:08 AM
Good afternoon,
I'm using a screen that is naturally in a portrait orientation but my application requires landscape. I've found how to rotate the entire GUI in TouchGFX, however I am finding that I need also to rotate every PNG asset I've imported 90 degrees for it to appear correctly on the simulator or the actual screen (Focus LCD).
Here it is without the asset rotated:
And here you'll see that I've rotated the asset 90 degrees in the `Images` section, and it appears correctly:
Is this expected behaviour or is something set up incorrectly in my project? I wouldn't expect to have to rotate every single asset, in addition to the global setting being set.
Thanks in advance!
Julia
Solved! Go to Solution.
2025-02-27 2:32 AM
Hello @jchernus-fikst ,
Yes, this is expected behavior.
When I change my display orientation in Config => Display like so :
it also changes the default image layout rotation to 90 automatically under Config => Default image configuration.
Perhaps it did not do that for you since you seem to have to set the rotation to all the images manually.
You could manually change the default image configuration so that you only have to do it once instead of doing it for every images :
Can I ask what board and TouchGFX version you are using?
If you want to not rotate your images, you should modify the dimension of your screen in STM32CubeMX so it is already in your preferred orientation.
Regards,
2025-02-27 2:32 AM
Hello @jchernus-fikst ,
Yes, this is expected behavior.
When I change my display orientation in Config => Display like so :
it also changes the default image layout rotation to 90 automatically under Config => Default image configuration.
Perhaps it did not do that for you since you seem to have to set the rotation to all the images manually.
You could manually change the default image configuration so that you only have to do it once instead of doing it for every images :
Can I ask what board and TouchGFX version you are using?
If you want to not rotate your images, you should modify the dimension of your screen in STM32CubeMX so it is already in your preferred orientation.
Regards,
2025-02-27 7:23 AM
Hi Gaetan,
Thanks so much for your reply - I'm new to TouchGFX and hadn't yet found the "default image rotation" - that makes so much sense. I will do that instead of rotating each one manually!
I started this project on the second to last version (4.24.1?) and then upgraded to 4.24.2. I am using custom hardware with an STM32H747BIT6. The project started in CubeMX, then moved into CubeIDE, and then I created the TouchGFX application from there.
Thanks for your help,
Julia