It looks like you're new here. If you want to get involved, click one of these buttons!
I want to Draw a line without knowing the end point or from how many points it's composed of. In this case i can't use delta x or maxnbpoints and a counter. I want the program to draw a line from my first touch location until touchstate ends. Moreover, i want the user to be able to lift up his finger and countinue without losing the previous drawn lines.
Can anyone be of anyhelp??
Comments
if you have one point but not the second it works
here (x1,y1) is not in the screen
Now I understand!
There have been quite a few posts about this, when people try to make a drawing program, where you can draw lines with your finger.
For example
https://codea.io/talk/discussion/comment/531
https://codea.io/talk/discussion/2774/drawing-on-codea
https://codea.io/talk/discussion/5798/fun-line-drawing
If you search on "drawing program" in the search box at the top right of screen, you may find more examples.
Thank you both @Ignatz and @hpsoft.. I will try them and let you know
@Ignatz i used the first link you sent me : "http://codea.io/talk/discussion/comment/531"
I altered one thing so it can be used on my code. Instead of defining red green blue and alpha i defined a variable colorfill because the colour changes when you hit a certain button... The code is running with no error.
But it seems it lost its capacity to keep the line drawn on the figure.
can you help?