How can I restore a straight line that has already been rotated to its original horizontal state after being rotated?

Source: Internet
Author: User
How can I restore a straight line that has already been rotated to its original horizontal state after being rotated? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiMultimedia/html/delphi_20061005165649268.html
How can I restore a straight line that is originally horizontal but has been rotated (the rotation angle is unknown) to its original horizontal state after being rotated?

You can use a straight line to calculate the angle between the line and the horizontal line.

If you want to rotate, there must be a center that rotates around him.
The rotation is also very simple, as long as you go through the center to make a horizontal line.

However, the line on the computer is also represented by a line segment without an endpoint.
Generally, after rotation, the positions of the two endpoints must correspond to those before rotation. In contrast, the two endpoints before and after rotation are in the same garden.

DetailsCodeOkay?

As long as you know the center point, just re-draw a straight line?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.