2021-05-28 09:30 AM
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:
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.
2021-06-01 12:25 AM
Hello MM..1,
Could you provide a picture of the UI ? (With the code it would be perfect)
/Alexandre
2021-06-01 11:50 AM
#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();
}
}
2021-06-01 09:49 PM
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
2021-06-01 11:14 PM
2021-06-02 12:10 AM
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?
2021-06-02 12:49 AM
Explain video recorded in slow mode 1:10 @Alexandre RENOUX
2021-06-02 12:52 AM
2021-06-02 12:59 AM
This could simply be a hardware issue that happens during the transition. Do you have a datasheet for the display?
2021-06-02 01:09 AM