I have tried to understand how a canvas works, but I'm not even sure that would work on a screen, and I really couldn't get a handle on the whole thing. I'm too dumb for that I am afraid...
I have also tried to draw it by hand by adding a small square and then rotating and stretching it, but I ultimately failed as well.
Is there an easy solution? I just need something like "draw a line from x1,y1 to x2,y2" within a screen.
I would be super thankful for your help!
P.S.: Here's my failed attempt to draw the line by hand:
Code: Select all
$theta=math.atan((cy[1]-cy[0])/(cx[0]-cx[1]))
$lengthofline=math.sqrt((cy[1]-cy[0])**2+(cx[0]-cx[1])**2)
add "images/others/point.png":
xanchor 0
yanchor 0
xpos cx[0]
ypos cy[0]
rotate theta
xzoom lengthofline