From e44b9de426cfa07c598fda61d214dc053a0706dd Mon Sep 17 00:00:00 2001 From: cilix42 Date: Fri, 1 Aug 2008 17:41:40 +0000 Subject: [PATCH] Helperpath for lpe-rotate-copies --- src/live_effects/lpe-copy_rotate.cpp | 17 +++++++++++++++++ src/live_effects/lpe-copy_rotate.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp index d193b6d66..79312ad9b 100644 --- a/src/live_effects/lpe-copy_rotate.cpp +++ b/src/live_effects/lpe-copy_rotate.cpp @@ -108,6 +108,23 @@ LPECopyRotate::doEffect_pwd2 (Geom::Piecewise > const & p return output; } +void +LPECopyRotate::addCanvasIndicators(SPLPEItem *lpeitem, std::vector &hp_vec) +{ + using namespace Geom; + + Point start_pos = origin + dir * Rotate(-deg_to_rad(starting_angle)) * dist_angle_handle; + Point rot_pos = origin + dir * Rotate(-deg_to_rad(starting_angle + rotation_angle)) * dist_angle_handle; + + Path path(start_pos); + path.appendNew((Geom::Point) origin); + path.appendNew(rot_pos); + + PathVector pathv; + pathv.push_back(path); + hp_vec.push_back(pathv); +} + namespace CR { using namespace Geom; diff --git a/src/live_effects/lpe-copy_rotate.h b/src/live_effects/lpe-copy_rotate.h index 98e8ceaf2..7cf9bdef7 100644 --- a/src/live_effects/lpe-copy_rotate.h +++ b/src/live_effects/lpe-copy_rotate.h @@ -39,6 +39,9 @@ public: friend class CR::KnotHolderEntityStartingAngle; friend class CR::KnotHolderEntityRotationAngle; +protected: + virtual void addCanvasIndicators(SPLPEItem *lpeitem, std::vector &hp_vec); + private: ScalarParam starting_angle; ScalarParam rotation_angle; -- 2.30.2