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?