summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-tangent_to_curve.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-08 18:08:56 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-08 18:08:56 +0000
commit3febc6667be102e40bd4cf1f689bd8e82e5b0ec3 (patch)
tree841f53c095bc30f3d104b46519225f0a37d24de7 /src/live_effects/lpe-tangent_to_curve.cpp
parentBetter way to add LPE knotholder handles; now it happens semi-automatically i... (diff)
downloadinkscape-3febc6667be102e40bd4cf1f689bd8e82e5b0ec3.tar.gz
inkscape-3febc6667be102e40bd4cf1f689bd8e82e5b0ec3.zip
Re-add two handles for PerpBisector LPE (we don't add the other two because they would duplicate the path's own handles and the correct solution would be to allow knotholders and nodepaths at the same time).
Put the KnotHolderEntity classes into their own namespaces to avoid clashes. (bzr r5857)
Diffstat (limited to 'src/live_effects/lpe-tangent_to_curve.cpp')
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index 02d34f312..6fc7161ed 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -27,6 +27,8 @@
namespace Inkscape {
namespace LivePathEffect {
+namespace TtC {
+
class KnotHolderEntityAttachPt : public KnotHolderEntity
{
public:
@@ -57,6 +59,8 @@ public:
virtual void onKnotUngrabbed();
};
+} // namespace TtC
+
LPETangentToCurve::LPETangentToCurve(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
angle(_("Angle"), _("Additional angle between tangent and curve"), "angle", &wr, this, 0.0),
@@ -69,9 +73,9 @@ LPETangentToCurve::LPETangentToCurve(LivePathEffectObject *lpeobject) :
registerParameter( dynamic_cast<Parameter *>(&length_left) );
registerParameter( dynamic_cast<Parameter *>(&length_right) );
- registerKnotHolderHandle(new KnotHolderEntityAttachPt(), _("Adjust the \"left\" end of the tangent"));
- registerKnotHolderHandle(new KnotHolderEntityLeftEnd(), _("Adjust the \"right\" end of the tangent"));
- registerKnotHolderHandle(new KnotHolderEntityRightEnd(), _("Adjust the point of attachment of the tangent"));
+ registerKnotHolderHandle(new TtC::KnotHolderEntityAttachPt(), _("Adjust the \"left\" end of the tangent"));
+ registerKnotHolderHandle(new TtC::KnotHolderEntityLeftEnd(), _("Adjust the \"right\" end of the tangent"));
+ registerKnotHolderHandle(new TtC::KnotHolderEntityRightEnd(), _("Adjust the point of attachment of the tangent"));
}
LPETangentToCurve::~LPETangentToCurve()
@@ -99,6 +103,9 @@ LPETangentToCurve::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const
return output;
}
+namespace TtC {
+
+// TODO: make this more generic
static LPETangentToCurve *
get_effect(SPItem *item)
{
@@ -197,9 +204,7 @@ KnotHolderEntityRightEnd::onKnotUngrabbed()
lpe->length_right.write_to_SVG();
}
-
-
-
+} // namespace TtC
} //namespace LivePathEffect
} /* namespace Inkscape */