cancel
Showing results for 
Search instead for 
Did you mean: 

Image painters do not work when Display Orientation is Portrait and WIDTH > HEIGHT

scottSD
Lead

I asked this question in the following thread:

https://community.st.com/s/question/0D53W000003vv9GSAQ/cacheable-container-does-not-work-when-display-orientation-is-landscape-and-width-height

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):

0693W000008zf2CQAQ.pngI added an image which will be painted in a circle. Here is the image's settings in the Image Format tab of the Designer:

0693W000008zf5GQAQ.pngI placed this in a circle. Here is the Designer circle's parameters:

0693W000008zggDQAQ.pngIt shows up in the Designer (above), but DOES NOT SHOW UP in the simulator:

0693W000008zf6sQAA.pngIf I change the Circle to be painted with a color fill instead of the image, it shows up on the simulator:

0693W000008zf8ZQAQ.pngThe 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:

0693W000008zfAfQAI.pngIt then shows up on the simulator:

0693W000008zfBsQAI.pngBut 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.

10 REPLIES 10
scottSD
Lead

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:

0693W000008zgYnQAI.pngThe simulator shows it shifted:

0693W000008zgZlQAI.png 

Painting an image in a Shape is also an issue....

scottSD
Lead

Can anyone verify for me that this is indeed a bug?

Planning to but didn't manage to find the time sorry :downcast_face_with_sweat:, i'll do it first thing tomorrow

@Romain DIELEMAN​ 

Thanks for the reply! I am looking forward to some feedback on it.

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

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

@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.

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:

0693W00000ALzR5QAL.png initial image:

0693W00000ALzSIQA1.pngThank 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

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.