2024-08-25 02:12 PM
Hello, I am trying to modify the start and end points of a line I have created in TouchGFX from outside of the screen code generated by touchGFX. I would like to be able to modify the end points from my own source code files by calling line1.setEnd(240, 240) or even creating a function inside of screen1view that would update the endpoints.
Thanks for any suggestions!
2024-08-27 04:55 AM
Hello @brohr01,
You just need to use setEnd and, do an invalidation before and after you :
void Screen1View::MyFunction()
{
line1.invalidate(); // needed to mark the old area to invalidate
line1.setEnd(newEndX, newEndY);
line1.invalidate();
}
I hope it helps,
Best regards,