2025-07-21 5:11 AM
hello everyone:
I have a problem trying to draw lines.In touchgfx,in most cases,things are done by bitmaps,but draw lines, it is awfull to use. In designer,if I want to draw a line ,I need to first add a line statement,then set line parameter, then add this line to screen.But in many applications,I have to draw dozens of line segments,even more.So,how can I manage to draw dozens of lines into screen or a dynamic bitmap?I have read about the cavas widget,but I can't find any demo on this subject, I really hope to get some help.
2025-07-21 5:40 AM
Hello @amb,
You can find examples in the documentation Canvas Widgets | TouchGFX Documentation.
BR,
2025-07-21 7:21 AM
I tried to put that code into screen1View.cpp,but got this : error: no matching function for call to 'touchgfx::Canvas::Canvas(const Diamond10x10*, const touchgfx::Rect&)