summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-01 17:41:40 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-01 17:41:40 +0000
commitfcf2e3956b4bb94477dd39680a97c8791980d4d8 (patch)
tree5d9c8abaa32f1ba85d27bee1c687310cf3fbafba /src
parentImproved UI for lpe-rotate-copies (diff)
downloadinkscape-fcf2e3956b4bb94477dd39680a97c8791980d4d8.tar.gz
inkscape-fcf2e3956b4bb94477dd39680a97c8791980d4d8.zip
Helperpath for lpe-rotate-copies
(bzr r6509)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp17
-rw-r--r--src/live_effects/lpe-copy_rotate.h3
2 files changed, 20 insertions, 0 deletions
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<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;
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<Geom::PathVector> &hp_vec);
+
private:
ScalarParam starting_angle;
ScalarParam rotation_angle;