summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9097591)
raw | patch | inline | side by side (parent: 9097591)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 8 Jan 2008 19:52:22 +0000 (19:52 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 8 Jan 2008 19:52:22 +0000 (19:52 +0000) |
index 500578db464a75fd1cdfed451b29cb7b7abae47e..893f0d7f1c88478e4833ad85f311f52c7a9d5200 100644 (file)
}
+void
+Parameter::param_write_to_repr(const char * svgd)
+{
+ param_effect->getRepr()->setAttribute(param_key.c_str(), svgd);
+}
/*###########################################
* REAL PARAM
index 08af7f928b6c2f4f99c38123d55a824f58e8d75b..e3d372706560af5e967239bf665145707c22d6c0 100644 (file)
Effect* param_effect;
+ void param_write_to_repr(const char * svgd);
+
private:
Parameter(const Parameter&);
Parameter& operator=(const Parameter&);
index 9bc81d52111a586524d77e397cbc3c69cce68c9d..1f0e6f3be181c658c9404ee42bc717bd52e1af8a 100644 (file)
}
void
-PathParam::param_write_to_repr(const char * svgd)
+PathParam::param_transform_multiply(Geom::Matrix const& postmul, bool /*set*/)
{
- param_effect->getRepr()->setAttribute(param_key.c_str(), svgd);
+ param_set_and_write_new_value( (*this) * postmul );
}
-
void
PathParam::param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath)
{
index a269f3e4f26bf2a034c6034dba01b65e7c819d1d..82e240310d7bf82dc4e70956cc6af53f13ba21d3 100644 (file)
void param_editOncanvas(SPItem * item, SPDesktop * dt);
void param_setup_nodepath(Inkscape::NodePath::Path *np);
- virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/) {};
+ virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
sigc::signal <void> signal_path_pasted;
sigc::signal <void> signal_path_changed;
Gtk::Widget * _widget;
Gtk::Tooltips * _tooltips;
- void param_write_to_repr(const char * svgd);
-
void on_edit_button_click();
void on_paste_button_click();
index 3d13ed12dfc93b639bdbbb6840192a3b6247c0e7..eea337c8599a46e6eb2a9f476776ab1b5b0713df 100644 (file)
pointwdg->setValue(newpoint[0], newpoint[1]);
}
+void
+PointParam::param_set_and_write_new_value (Geom::Point newpoint)
+{
+ Inkscape::SVGOStringStream os;
+ os << newpoint[0] << "," << newpoint[1];
+ gchar * str = g_strdup(os.str().c_str());
+ param_write_to_repr(str);
+ g_free(str);
+}
+
+void
+PointParam::param_transform_multiply(Geom::Matrix const& postmul, bool /*set*/)
+{
+ param_set_and_write_new_value( (*this) * postmul );
+}
+
// CALLBACKS:
index 72b3991e15efe98e5429458434a4e20b7aa9354b..688a50d4abe9d53d5e835498dae5f72328f1e3e0 100644 (file)
void param_setValue(Geom::Point newpoint);
void param_set_default();
- virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/) {};
+ void param_set_and_write_new_value(Geom::Point newpoint);
+
+ virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
private:
PointParam(const PointParam&);