summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/parameter')
-rw-r--r--src/live_effects/parameter/path.cpp9
-rw-r--r--src/live_effects/parameter/path.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index 2b558d2dd..68f7be4a9 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -147,6 +147,15 @@ PathParam::param_write_to_repr(const char * svgd)
}
+void
+PathParam::param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath)
+{
+ const std::vector<Geom::Path> temppath = Geom::path_from_piecewise(newpath, LPE_CONVERSION_TOLERANCE);
+ gchar * svgd = SVGD_from_2GeomPath( temppath );
+ param_write_to_repr(svgd);
+ g_free(svgd);
+}
+
/* CALLBACK FUNCTIONS FOR THE BUTTONS */
void
PathParam::on_edit_button_click()
diff --git a/src/live_effects/parameter/path.h b/src/live_effects/parameter/path.h
index 6ba6e7e4b..23f168c48 100644
--- a/src/live_effects/parameter/path.h
+++ b/src/live_effects/parameter/path.h
@@ -44,6 +44,8 @@ public:
void param_set_default();
+ void param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath);
+
void param_editOncanvas(SPItem * item, SPDesktop * dt);
sigc::signal <void> signal_path_pasted;