Jump to content

Recommended Posts

Hi, I would like to have a very simple protractor to users, to help to measure angle on a photo. I am apparently very JS beginner but maybe somebody can help?

Let's have an image with television and imaginative blue axis x which will not be visible in the JS tool, but it helps me to explain how the tool should work.

I would like to measure some angle for example in the profile view, and I will draw the red line and blue angle to show you which angle I want to measure.

 

2gubjhx.jpg

 

 

Now as the description shows, you should need to do two clicks. One to show the initiate point, the second to show the ending point. The angle that should be measured would be alpha. You would just twice click and it would calculated the angle referenced to the horizontal axis and show it somewhere outside the image. Could anybody do this?

 

Additional and voluntary opinion would be to display the angle during you move the mouse cursor just after first click, when you are trying to find the correct point so you would not need to click, but also to show the red line between starting point and the mouse cursor xy position.

 

Use of the protractor, for example if user uploaded photo, but he needs to rotate it and does not know how much. So he would measure it and then I can use php code to fix the rotation of the photo :-)

Edited by murfy
Link to comment
https://forums.phpfreaks.com/topic/287033-js-protractor/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.