cancel
Showing results for 
Search instead for 
Did you mean: 

Need some help for drawing line segment freely inTouchgfx

amb
Associate III

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.

2 REPLIES 2
LouisB
ST Employee

Hello @amb,

You can find examples in the documentation Canvas Widgets | TouchGFX Documentation.

BR,

Louis BOUDO
ST Software Engineer | TouchGFX
amb
Associate III

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&)