cancel
Showing results for 
Search instead for 
Did you mean: 

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

MM..1
Chief II

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.

15 REPLIES 15
Alexandre RENOUX
Principal

Hello MM..1,

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

/Alexandre

#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
Principal

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

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
Senior III

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?

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

This could simply be a hardware issue that happens during the transition. Do you have a datasheet for the display?

No hardware in display , but something in STM and TouchGFX, because I add line
remove(__background);
And transition is perfect.