Code

Helperpath for lpe-rotate-copies
authorcilix42 <cilix42@users.sourceforge.net>
Fri, 1 Aug 2008 17:41:40 +0000 (17:41 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Fri, 1 Aug 2008 17:41:40 +0000 (17:41 +0000)
src/live_effects/lpe-copy_rotate.cpp
src/live_effects/lpe-copy_rotate.h

index d193b6d66591ae483d9e4915c7b9422dc6c5b7f5..79312ad9b7e49a8db5db0a24290190336c800255 100644 (file)
@@ -108,6 +108,23 @@ LPECopyRotate::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
     return output;
 }
 
+void
+LPECopyRotate::addCanvasIndicators(SPLPEItem *lpeitem, std::vector<Geom::PathVector> &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<LineSegment>((Geom::Point) origin);
+    path.appendNew<LineSegment>(rot_pos);
+
+    PathVector pathv;
+    pathv.push_back(path);
+    hp_vec.push_back(pathv);
+}
+
 namespace CR {
 
 using namespace Geom;
index 98e8ceaf2ed070d561e1e9525df23562308933e1..7cf9bdef7b05cce45f07489eea8f516522573897 100644 (file)
@@ -39,6 +39,9 @@ public:
     friend class CR::KnotHolderEntityStartingAngle;
     friend class CR::KnotHolderEntityRotationAngle;
 
+protected:
+    virtual void addCanvasIndicators(SPLPEItem *lpeitem, std::vector<Geom::PathVector> &hp_vec);
+
 private:
     ScalarParam starting_angle;
     ScalarParam rotation_angle;