summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/effect.cpp10
-rw-r--r--src/live_effects/effect.h1
-rw-r--r--src/live_effects/lpe-perp_bisector.cpp16
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp24
-rw-r--r--src/live_effects/lpeobject.cpp2
5 files changed, 13 insertions, 40 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index b08077e79..de41d6a59 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -215,6 +215,16 @@ Effect::doBeforeEffect (SPLPEItem */*lpeitem*/)
}
+void
+Effect::writeParamsToSVG() {
+ g_print ("Parameters get written to SVG\n");
+ std::vector<Inkscape::LivePathEffect::Parameter *>::iterator p;
+ for (p = param_vector.begin(); p != param_vector.end(); ++p) {
+ g_print ("writing parameter %s to SVG\n", (*p)->param_key.c_str());
+ (*p)->write_to_SVG();
+ }
+}
+
/*
* Here be the doEffect function chain:
*/
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index f0d0ffdd5..b78e931f9 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -96,6 +96,7 @@ public:
virtual void doOnApply (SPLPEItem *lpeitem);
virtual void doBeforeEffect (SPLPEItem *lpeitem);
+ void writeParamsToSVG();
virtual void doEffect (SPCurve * curve);
diff --git a/src/live_effects/lpe-perp_bisector.cpp b/src/live_effects/lpe-perp_bisector.cpp
index 9c7ed0a7e..a7963ce7b 100644
--- a/src/live_effects/lpe-perp_bisector.cpp
+++ b/src/live_effects/lpe-perp_bisector.cpp
@@ -32,7 +32,6 @@ public:
virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
virtual NR::Point knot_get();
- virtual void onKnotUngrabbed();
};
class KnotHolderEntityRightEnd : public KnotHolderEntity
@@ -42,7 +41,6 @@ public:
virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
virtual NR::Point knot_get();
- virtual void onKnotUngrabbed();
};
// TODO: Make this more generic
@@ -100,20 +98,6 @@ KnotHolderEntityRightEnd::knot_set(NR::Point const &p, NR::Point const &/*origin
bisector_end_set(item, p, false);
}
-void
-KnotHolderEntityLeftEnd::onKnotUngrabbed()
-{
- LPEPerpBisector *lpe = get_effect(item);
- lpe->length_left.write_to_SVG();
-}
-
-void
-KnotHolderEntityRightEnd::onKnotUngrabbed()
-{
- LPEPerpBisector *lpe = get_effect(item);
- lpe->length_right.write_to_SVG();
-}
-
/**
NR::Point path_start_get(SPItem *item) {
Inkscape::LivePathEffect::LPEPerpBisector *lpe =
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index 6fc7161ed..2115e9d7e 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -36,7 +36,6 @@ public:
virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
virtual NR::Point knot_get();
- virtual void onKnotUngrabbed();
};
class KnotHolderEntityLeftEnd : public KnotHolderEntity
@@ -46,7 +45,6 @@ public:
virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
virtual NR::Point knot_get();
- virtual void onKnotUngrabbed();
};
class KnotHolderEntityRightEnd : public KnotHolderEntity
@@ -56,7 +54,6 @@ public:
virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
virtual NR::Point knot_get();
- virtual void onKnotUngrabbed();
};
} // namespace TtC
@@ -183,27 +180,6 @@ KnotHolderEntityRightEnd::knot_get()
return lpe->D;
}
-void
-KnotHolderEntityAttachPt::onKnotUngrabbed()
-{
- LPETangentToCurve *lpe = get_effect(item);
- lpe->t_attach.write_to_SVG();
-}
-
-void
-KnotHolderEntityLeftEnd::onKnotUngrabbed()
-{
- LPETangentToCurve *lpe = get_effect(item);
- lpe->length_left.write_to_SVG();
-}
-
-void
-KnotHolderEntityRightEnd::onKnotUngrabbed()
-{
- LPETangentToCurve *lpe = get_effect(item);
- lpe->length_right.write_to_SVG();
-}
-
} // namespace TtC
} //namespace LivePathEffect
diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp
index 0a7fb5eb0..432a484ee 100644
--- a/src/live_effects/lpeobject.cpp
+++ b/src/live_effects/lpeobject.cpp
@@ -221,6 +221,8 @@ livepatheffect_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
// lpeobj->lpe->write(repr); something like this.
+ lpeobj->lpe->writeParamsToSVG();
+
if (((SPObjectClass *) livepatheffect_parent_class)->write)
(* ((SPObjectClass *) livepatheffect_parent_class)->write)(object, repr, flags);