From 3a1866ab31229a9adb417ff230add5ab6b9b9ddf Mon Sep 17 00:00:00 2001 From: schwieni Date: Sun, 24 Mar 2019 10:14:33 +0100 Subject: lpe-pts2ellipse: added perspective circle from 4 points improved tool-tips for better usability --- src/live_effects/lpe-pts2ellipse.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/live_effects/lpe-pts2ellipse.cpp b/src/live_effects/lpe-pts2ellipse.cpp index 0e972c68e..c657c18aa 100644 --- a/src/live_effects/lpe-pts2ellipse.cpp +++ b/src/live_effects/lpe-pts2ellipse.cpp @@ -726,6 +726,10 @@ int LPEPts2Ellipse::genPerspectiveEllipse(std::vector const &pts, G path_out.push_back(path); // 5) frames and axes + bool ccw_wind = false; + if (gen_perspective_frame.get_value() || draw_perspective_axes.get_value()) + ccw_wind = is_ccw(pts); + const double ra = ccw_wind ? rot_angle : -rot_angle; // draw frame? if (gen_isometric_frame.get_value()) { @@ -734,7 +738,7 @@ int LPEPts2Ellipse::genPerspectiveEllipse(std::vector const &pts, G // draw perspective frame? if (gen_perspective_frame.get_value()) { - gen_perspective_frame_paths(path_out, rot_angle, projmatrix); + gen_perspective_frame_paths(path_out, ra, projmatrix); } // draw axes? @@ -744,7 +748,7 @@ int LPEPts2Ellipse::genPerspectiveEllipse(std::vector const &pts, G // draw perspective axes? if (draw_perspective_axes.get_value()) { - gen_perspective_axes_paths(path_out, rot_angle, projmatrix); + gen_perspective_axes_paths(path_out, ra, projmatrix); } return 0; -- cgit v1.2.3