2020-10-22 02:41 AM
Hello,
Hello,
I'm currently developing an application on a STM32H753VT6 with touchGFX and I have an issue with the function resizeToCurrentTextWithAlignment(). Indeed when i'm changing the current text (I use a Wildcard) with another text smaller there is no problem. But when I'm changing this text again (same value) and an invalidate the textArea, the old text appears on my screen (R and E of the last word displayed "Residence") :
Any idea of why there are these kind of glitches ? Here is my code :
// first I update the wildcard buffer
Unicode::strncpy(textArea_residenceBuffer, s_current_command_splitted.c_first_line_a, MAX_NB_CHARS);
// then i resize the text area
textArea_residence.resizeToCurrentTextWithAlignment();
// finally I invalidate the area
textArea_residence.invalidate()
Thanks,
Best regards,
AJT
Solved! Go to Solution.
2020-10-23 01:00 AM
Hi,
It should be fine in your case, especially with an STM32H7. Your UI also does not seem to involve complex animations or calculations. I would not recommend to refresh the full screen for low cost solutions.
The issue you faced was that you did not refresh the entire zone where you did modifications. You only modified the content of the text. If your background is just white, you could put a white box under the text zone that you refresh instead of the whole background. Or you could try to put the text in a Container widget and refresh the container, that should do the job as well.
Try the different solutions to see what suits your project the best.
/Romain
2020-10-22 06:58 AM
Hi,
Could you try to invalidate the background /image behind it as well?
/Romain
2020-10-22 07:39 AM
looks like it works !
Is it not too much too invalidate the whole background ? (in terms of processing ?)
Thank you,
AJT141
2020-10-23 01:00 AM
Hi,
It should be fine in your case, especially with an STM32H7. Your UI also does not seem to involve complex animations or calculations. I would not recommend to refresh the full screen for low cost solutions.
The issue you faced was that you did not refresh the entire zone where you did modifications. You only modified the content of the text. If your background is just white, you could put a white box under the text zone that you refresh instead of the whole background. Or you could try to put the text in a Container widget and refresh the container, that should do the job as well.
Try the different solutions to see what suits your project the best.
/Romain
2020-10-23 01:16 AM
Hello,
Nice answer this is crystal clear ! :thumbs_up:
If STM32H7 is not a low cost MCU, why should i not be able to create this animation (still do not have the answer) : https://community.st.com/s/question/0D53W00000KH5v9SAD/multiple-circles-display-leads-to-frame-rate-drop
thank you again !
AJT141
2020-10-23 02:41 AM
I'll answer on the other topic but alpha over alpha implies a lot of computation.