cancel
Showing results for 
Search instead for 
Did you mean: 

How to draw a line with finger?

Jack li1
Associate III

Hi,How can i draw a line on my display touchscreen with my finger.I have used Graph widget before,but the coordinate point must be monotone increasing。Could i use the method for QrCode,and could you write an example for this。Thanks�?�?�?

Best regards

3 REPLIES 3
Martin KJELDSEN
Chief III

Hi @Jack li​,

You could create a custom widget (Like the QrCode) that hooks into the ::draw() method and simply draw into the framebuffer at the relative location of your finger (hook into ::handleClickEvent() and ::handleDragEvent() to get these coordinates. You will not have the antialiasing that the Graph gives you, but you have more freedom here.

Does that make sense?

Best regards,

Martin

Jack li1
Associate III

😁

Hello,@Martin KJELDSEN​ 

Thanks for you help ,but i can understand that .First i can't understand how to use ::draw() method ,maybe on touchgfx.com have Tutorial,l can't find it.so could you tell me through the entire process step by step or how can i do this .

Thank you very much !!!!

Best regards

Jack li