Ask Your Question

drawing lines

asked 2014-05-09 08:17:22 -0500

mehddi gravatar image

updated 2016-01-22 06:57:57 -0500


how i can draw a line and get its length and angle?

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-09 08:28:07 -0500

There are some steps you need to follow

  1. Create a canvas and use the mouse handler to capture the points for drawing the line
  2. Use those points to calculate euclidean distance between two positions will give you the length
  3. Using trigonometry, you can calculate the corner between two points
edit flag offensive delete link more



thank you

mehddi gravatar imagemehddi ( 2014-05-15 01:16:06 -0500 )edit

Do accept the answer if it solved your problem.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-15 02:32:13 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-05-09 08:17:22 -0500

Seen: 157 times

Last updated: May 09 '14