Skip to main content
Bob Bailey
Senior
December 29, 2020
Question

"uncover" transition

  • December 29, 2020
  • 2 replies
  • 1379 views

I want to have another screen "slide in" covering my main screen based on a button click. and then "slide out". The slide-in is the cover transition, how do I 'uncover' ??

Thanks.

Bob

This topic has been closed for replies.

2 replies

Romain DIELEMAN
ST Employee
January 6, 2021

Hi,

What board are you using ? Are you starting a project from one of the Application Template in TouchGFX Designer ? If yes then you might need to enable the "animation storage". This is needed in order to do slide transitions or complex animations.

To enable it you need to allocate some memory for the animation storage in the function setFrameBufferStartAddresses() in the function TouchGFXHAL::initialize() in TouchGFXHAL.cpp in the folder TouchGFX/target of your project.

If you are using the two frame buffer strategy your function should look something like this:

void TouchGFXHAL::initialize()
{
 TouchGFXGeneratedHAL::initialize();
 
 setFrameBufferStartAddresses((void*)framebufferStartAddress, (void*)framebufferStartAddress + sizeFramebuffer, (void*) framebufferStartAddress + sizeFramebuffer *2 ; 
 
 instrumentation.init();
 setMCUInstrumentation(&instrumentation);
 enableMCULoadCalculation(true);
}

The memory allocated for the animation storage should be the same as a framebuffer (so for example for a display of 480 by 272 with 16bbp: 480 * 272 * 2 = 3FC00). This is not enabled by default for all boards as it requires enough RAM.

/Romain

Bob Bailey
Senior
January 6, 2021

I am starting with the application template, but, like most users, my project will be very close to the disco board (the disco boards are 'reference designs'), so I will be converting the AT project into a 'from scratch' project. (this process is terrible BTW, which I mentioned in the webinar session)

My animation storage is configured, the slide transitions work.

What I want is to develop a new transition type: "uncover". On a cover transition the new screen image slides in "on top of" the previous one. When I am done with that screen I want it to transition as if it is "sliding back out" revealing the original screen that was "under it".

I'm not sure I am describing it properly. I have looked at the transition logic, but I'm not sure I understand its inner workings yet. Any code I develop would be overwritten by code generation?

Thanks,

Bob

Romain DIELEMAN
ST Employee
January 7, 2021

Hi,

Sorry for not getting that at first. I believe what you are looking for is the "wipe transition" which would correspond to an "un-cover". If you wish to modify the speed of the transitions (to see if it truly is what you are looking for for example) you can modify the number of transition steps in WipeTransition.hpp.

What do you mean by "terrible process" by the way ? Could you add your inputs in the Idea zone of this forum if relevant ? This will help us keep track of your comments. You can start directly your project from scratch if you wish. The application templates available in TouchGFX Designer are for the ST dev kits, we only advise people to get some inspiration from these when building their own application template for their hardware as it might ease their development process.

/Romain

Bob Bailey
Senior
January 7, 2021

wipe is something different. with the wipe transitions the screen images don't have 'motion' like cover does. what I want to achieve is the cover transition but run in reverse so the screen image moves away revealing whats underneath (the previous screen in my case)

here is a bad video to try to show what I mean https://youtu.be/7W8RSPWWwII