summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4daaa4a)
raw | patch | inline | side by side (parent: 4daaa4a)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 15 Mar 2009 22:10:43 +0000 (22:10 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 15 Mar 2009 22:10:43 +0000 (22:10 +0000) |
index f67ee28a739d517995d66daa572358fd5b72eba9..3cdb21d6aee3f631242251ba20c03730a9d0eee7 100644 (file)
void
Effect::resetDefaults(SPItem * /*item*/)
{
- // do nothing for simple effects
+ std::vector<Inkscape::LivePathEffect::Parameter *>::iterator p;
+ for (p = param_vector.begin(); p != param_vector.end(); ++p) {
+ (*p)->param_set_default();
+ (*p)->write_to_SVG();
+ }
}
void
index ae42e358c2ef3e03bb1fc5d7e48d8d2ef89fdb70..702036f14c7d54a3634ad0c037d793757a15e0bb 100644 (file)
virtual Gtk::Widget * newWidget(Gtk::Tooltips * tooltips);
+ /**
+ * Sets all parameters to their default values and writes them to SVG.
+ */
virtual void resetDefaults(SPItem * item);
virtual void setup_nodepath(Inkscape::NodePath::Path *np);
index c3be5798155cae819908696ee15d19293343c990..a820fe4788e5b080feb296d0710ad32ab7740329 100644 (file)
@@ -124,6 +124,8 @@ LPEBendPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd
void
LPEBendPath::resetDefaults(SPItem * item)
{
+ Effect::resetDefaults(item);
+
original_bbox(SP_LPE_ITEM(item));
Geom::Point start(boundingbox_X.min(), (boundingbox_Y.max()+boundingbox_Y.min())/2);
index 2716e45d72a6951d96235e7f85aa23ae5d590eae..89fdef2f0531225b5d95a1d327ae8a7bcacd0d20 100644 (file)
void
LPECurveStitch::resetDefaults(SPItem * item)
{
+ Effect::resetDefaults(item);
+
if (!SP_IS_PATH(item)) return;
using namespace Geom;
index 553390585d7473b6e6250173e0ae51cc12389253..a730f14ff2c8f9f0f25aa9f82a7da7a028465781 100755 (executable)
@@ -220,6 +220,8 @@ LPEEnvelope::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd
void
LPEEnvelope::resetDefaults(SPItem * item)
{
+ Effect::resetDefaults(item);
+
original_bbox(SP_LPE_ITEM(item));
Geom::Point Up_Left(boundingbox_X.min(), boundingbox_Y.min());
index b2f1547a97b1820330d4f5b1e5c72dbcf8737414..e19d2e6e744701bacce89e7116d6610101b7b1b1 100644 (file)
void
LPEInterpolate::resetDefaults(SPItem * item)
{
+ Effect::resetDefaults(item);
+
if (!SP_IS_PATH(item))
return;
index f77434f92dad7c2bcb6da0f494909f8b0d3ebd99..0beedb5374618514456f8131318f87ab18e15a1b 100644 (file)
void
LPELattice::resetDefaults(SPItem * item)
{
+ Effect::resetDefaults(item);
+
original_bbox(SP_LPE_ITEM(item), false);
// place the 16 control points
index 1bac02ec488cc343c3f4fdb197db98df6c838592..7fa865c01098ca49ba18d50c65711ec453685abd 100644 (file)
void\r
LPERoughHatches::resetDefaults(SPItem * item)\r
{\r
+ Effect::resetDefaults(item);\r
+\r
Geom::OptRect bbox = item->getBounds(Geom::identity(), SPItem::GEOMETRIC_BBOX);\r
Geom::Point origin(0.,0.);\r
Geom::Point vector(50.,0.);\r
index 0f105ad608d2bae9dafb242cbd02262b8361759a..f18c4011be1c75cfebfda25cb284ef79768bf984 100644 (file)
void
LPEVonKoch::resetDefaults(SPItem * item)
{
+ Effect::resetDefaults(item);
+
using namespace Geom;
original_bbox(SP_LPE_ITEM(item));