LCD: connect mouse click points with straight lines
Hello!
I wanted to use lcd object to connect mouse click points with straight lines. The main problem to me was to collect the xy coordinates of the current and the previous mouse clicks into the list required by linesegment to draw the lines between the clicks.
Here is my attempt, that (kind of) works:
Is there a more elegant and efficient way to create a list with two pairs of xy coordinates? Can you, please, show it to me? Maybe, I should try to save the click coordinates into dict?
Thank you!
The lcd object is deprecated. You might want to use mgraphics instead, perhaps - especially if you want to continue with the work forward....
Oops! Thanks for pointing me (I overlooked this info while reading the docs).
Here is an updated example patch using jet.mgraphics. Looks like everything is working fine. There is still one problem though: after a first click there is a line connecting the 0,0 point with the point where mouse was clicked. Is there a way to get rid of this one first line?
Thank you!
I moved the further discussion here, because it is no more related to LCD.