‎2021-04-15 06:29 AM
I asked this question in the following thread:
But received no responses, so I decided to create it's own thread and ask the question specific to image painters.
I believe there is a bug in TouchGFX. It shows up 4.15.0 and 4.16.1 (I am not sure about other versions). I will explain the process to recreate it below (then maybe I'll get some responses?).
I am having this problem on my custom board, but was able to recreate it with the STM32F769I Discovery Kit template and simulate it. It is an 800x480 display, and I have selected Portrait Display Orientation (the opposite of the native orientation of the display):
I added an image which will be painted in a circle. Here is the image's settings in the Image Format tab of the Designer:
I placed this in a circle. Here is the Designer circle's parameters:
It shows up in the Designer (above), but DOES NOT SHOW UP in the simulator:
If I change the Circle to be painted with a color fill instead of the image, it shows up on the simulator:
The only way that i have been able to get the image to show up on the simulator is adjusting the width of the circle in the Designer:
It then shows up on the simulator:
But notice also that the image is NOT in the correct location (slightly to the right horizontally).
Maybe I am wrong and this is not a bug, but it does not behave the same as when the Display Orientation is set to the same as the Dimensions. (And it is more than frustrating when trying to get it to work in code instead of the Designer).
Also note that I have seen this same behavior when the Display Orientation is Landscape and the WIDTH < HEIGHT.
‎2021-04-15 08:35 AM
I also found the issue reveals itself when painting an image into a line. I added an image to be painted a line widget in the Designer:
The simulator shows it shifted:
Painting an image in a Shape is also an issue....
‎2021-04-19 06:51 AM
Can anyone verify for me that this is indeed a bug?
‎2021-04-19 07:16 AM
Planning to but didn't manage to find the time sorry :downcast_face_with_sweat:, i'll do it first thing tomorrow
‎2021-04-19 07:28 AM
@Romain DIELEMAN​
Thanks for the reply! I am looking forward to some feedback on it.
‎2021-04-20 01:34 AM
Just tried and I do not face this issue. My image is properly displayed on the simulator. Could you share the image you are using so that I can replicate what you did exactly ?
I am using TouchGFX designer 4.16.1 by the way, and just a circle widget with the image in my UI.
/Romain
‎2021-04-20 01:39 AM
I also do not face the image shift (which was something that would not have suprised me to be honest there is a similar issue with texts).
This is strange I'll try with different images and also play around the settings a bit more, but if you could share your project or the images that would be great :thumbs_up:
/Romain
‎2021-04-20 05:18 AM
@Romain DIELEMAN​
The issue shows up when you make the width of the line, circle, or shape different than the width of the image. Typically, when working with the Designer, I can make the width whatever I want (not necessarily matching the image's width). One reason I make the width different than the image is that I often have my circle's center offset from the center of the image.
When I rotate the screen (Portrait and width > height), if I ensure that the widget's dimensions are the same as the image, I do not see this problem. However, on a non-rotated project, I do not need to ensure the widget's dimensions are the same as the image.
‎2021-04-20 05:34 AM
OK I just faced it as well
I didn't face it at first even when changing the width or height of the circle (which I tried as well previously) because I was still using a very wide scenario. When I tried setting a smaller zone I faced it. In my case i will make a first assumption that the widget considers that you are in the original display orientation (landscape, not portrait), which is why in my screenshot (on the left is the canvas in Designer and on the right is the simulation) the right side of my image used in the circle is displayed even though I set it to display the left side. Or something similar, anyway I was able to replicate the bug so this is good news in a way :grinning_face_with_sweat:
initial image:
Thank you for reporting this, took me more time than wanted to face it , but now I have created an internal ticket for the Designer team so that they can further investigate and fix this bug :thumbs_up:
/Romain
‎2021-04-20 05:48 AM
Thanks @Romain DIELEMAN​ for looking at it and verifying it is indeed a bug. Now I know that I'm not crazy ;)
Note, however, that I did first notice this while writing the widget's parameters in code (not in the Designer). I only used the Designer in order to simulate it to demonstrate the bug.