Skip to main content
MM..1
Chief III
May 28, 2021
Question

Issue report TouchGFX box rendering. Need solve or explain from ST Employe

  • May 28, 2021
  • 5 replies
  • 2307 views

New versions TouchGFX automatic declare __background box in base project.

This is added to every screen and setup over all screen and use black color.

I see problem on big display 1280x480 , but i mean exist on all configs.

Steps to replicate:

  1. create screen with or without next backgroundbox.
  2. add for example one image and two big font text area, i use 108 size
  3. in setup screen set only image visible
  4. in handletickevent set on timeout switch visible texts and invisible image

On moment when this change on display is visible short chaotic redrawing on text areas.

This cant be recorded to video because i dont have high speed cam, but is exactly failure.

When i add to setup screen line

remove(__background);

or any other box used , transition is perfect without scratch.

When i use background TiledImage, transition is too ok.

Seems as rendering boxes or maybe any canvas work bad.

I hope in next version all works better.

This topic has been closed for replies.

5 replies

Alexandre RENOUX
Visitor II
June 1, 2021

Hello MM..1,

Could you provide a picture of the UI ? (With the code it would be perfect)

/Alexandre

MM..1
MM..1Author
Chief III
June 1, 2021
#include <gui/screen_screen/screenView.hpp>
 
screenView::screenView()
{
 
}
 
void screenView::setupScreen()
{
 screenViewBase::setupScreen();
 
 remove(__background); // bug 1 !!!
 
 textArea1.setVisible(false);
 textArea2.setVisible(false);
 imageLogo.setAlpha(255);
 
}
 
void screenView::tearDownScreen()
{
 screenViewBase::tearDownScreen();
}
 
void screenView::handleTickEvent()
{
	tickCounter++;
 
/*	if(imageLogo.isVisible() && tickCounter%12==1)
	{
		imageLogo.setAlpha(timeout1.t/16);
		imageLogo.invalidate();
	}*/
	if(imageLogo.isVisible() && (tickCounter%800)==400)
	{
		imageLogo.setVisible(false);
		imageLogo.invalidate();
		textArea1.setVisible(true);
	 textArea2.setVisible(true);
	 textArea1.invalidate();
	 textArea2.invalidate();
	}
	if(!imageLogo.isVisible() && (tickCounter%800)==1)
	{
 textArea1.setVisible(false);
 textArea2.setVisible(false);
	imageLogo.setVisible(true);
	imageLogo.invalidate();
 textArea1.invalidate();
 textArea2.invalidate();
	}
}

Alexandre RENOUX
Visitor II
June 2, 2021

Hello MM..1,

I wasn't able to run your project correctly but by looking at the code I think I might understand now.

You should not remove __background. It is added automatically by TouchGFX for a reason. Basically, if you have no solid background, rendering will not be performed correctly. Before, we had to say to people to always add a box or an image covering the entire screen at the beginning of their project. So to avoid repeating ourselves we simply added this box by default.

Does it answer your question ?

/Alexandre

MM..1
MM..1Author
Chief III
June 2, 2021
No Alexandre it not answer,
I write when I use original code without remove background box, then I see visual scratches on testareas or all display. And yes when I remove background box visual is ok, but some other not working.
For example instead box I add to background tiled image and code works. But when I set tiledimage invisible,
engine fail control visibility of other objects.
HP_it
Senior II
June 2, 2021

I just created a project for the 746 board to test. I have no problem showing the following (I changed a few lines but the functionality stays the same)

void Screen1View::handleTickEvent()
{
	tickCounter++;
 
/*	if(imageLogo.isVisible() && tickCounter%12==1)
	{
		imageLogo.setAlpha(timeout1.t/16);
		imageLogo.invalidate();
	}*/
	if(imageLogo.isVisible() && (tickCounter%400)==0)
	{
		imageLogo.setVisible(false);
		textArea1.setVisible(true);
	 textArea2.setVisible(true);
	}
	if(!imageLogo.isVisible() && (tickCounter%800)==0)
	{
		textArea1.setVisible(false);
		textArea2.setVisible(false);
		imageLogo.setVisible(true);
	}
	imageLogo.invalidate();
 textArea1.invalidate();
 textArea2.invalidate();
}

I added the setupScreen code as well.

I use a box that fills the whole screen as a background - maybe that does the trick?

MM..1
MM..1Author
Chief III
June 2, 2021

Explain video recorded in slow mode 1:10 @Alexandre RENOUX​ 

MM..1
MM..1Author
Chief III
July 10, 2021

Hi @Alexandre RENOUX​  i test situation on 4.17 and no change. Now i in my code always replace target generated folder code with 4.13 files, that work for big display 1280x480 24bit RGB without this issue. I need understand why actual generated DMA and RTOS wrapper code isnt optimal as 4.13.

All versions after 13 have issue maybe not visible on lower resolutions.

MM..1
MM..1Author
Chief III
October 13, 2021

_?_

I solve this all with change buffer to RGB565.

For detail info RGB888 is on critical point for display 1280x480 and only speed in code version 4.13 can handle some application without animate screen.

Piranha
Principal III
October 17, 2021

You are talking with a bot... And it cited a distorted (with "synonyms") version of a part of your own earlier post:

"I write when I use original code without remove background box, then I see visual scratches on testareas or all display. And yes when I remove background box visual is ok, but some other not working."

MM..1
MM..1Author
Chief III
October 17, 2021

Yes ofcourse seems as AI bot