2024-04-21 04:19 AM
Hello, I'm trying to build a simple GUI Application with TouchGFX. And right now im trying to resize the updated area (make it bigger than needed) to get it byte aligned and because of other reasons as well.
I`ve found one Person who described it here. He has overwritten the Function
void FrontendApplication::draw(Rect& rect) {
// Make sure the draw area is always byte aligned
rect.x -= (rect.x % 8);
rect.width = ((rect.width + 7) / 8) * 8;
Application::draw(rect);
}
like this (Copyright to Mike Norgate - see the link).
I dont need exactly this function but i need to resize it at the same position in the code. So i tried to reproduced it but i got confused. I found here some mentioning of the function in touchgfx/Application.hpp but its mentioned under protected functions. So ive looked in my generated code, but in the TouchGFX/FrontendApplication.hpp there is no function like this and i couldnt find a application.hpp as well.
So I have no clue where I can find/overwrite the function to resize (make bigger) the area that is redrawn. I`m new to cpp and touchgfx. I hope theres an easy way to do it.
Thank you so much!
Solved! Go to Solution.
2024-04-21 05:56 AM - edited 2024-04-21 06:00 AM
Hello
I suppose you can implement your customized draw-function to frontendApplicaton.hpp/.cpp like in this post
Modify the files under /common/- folders
Hope this helps
Br JTP
2024-04-21 05:56 AM - edited 2024-04-21 06:00 AM
Hello
I suppose you can implement your customized draw-function to frontendApplicaton.hpp/.cpp like in this post
Modify the files under /common/- folders
Hope this helps
Br JTP