Ask Your Question
1

drawing lines

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

mehddi gravatar image

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

hi

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
2

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

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

Comments

1

thank you

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

Do accept the answer if it solved your problem.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-15 02:32:13 -0600 )edit

Question Tools

Stats

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

Seen: 365 times

Last updated: May 09 '14