summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-06-19 02:32:07 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-06-19 02:32:07 +0000
commitf164dc6009f644939ba5fb09503fe0e35f1d4aae (patch)
tree281c32b52168c049ce35d0f459413c28aa92a7b1 /src/live_effects
parentAdd clip group option from Ponyscape (diff)
parentFix make check (diff)
downloadinkscape-f164dc6009f644939ba5fb09503fe0e35f1d4aae.tar.gz
inkscape-f164dc6009f644939ba5fb09503fe0e35f1d4aae.zip
Update to experimental r13404
(bzr r13090.1.84)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/lpe-knot.cpp24
-rw-r--r--src/live_effects/lpe-knot.h1
2 files changed, 13 insertions, 12 deletions
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 05b6ed795..7e5006b3b 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -353,7 +353,11 @@ LPEKnot::LPEKnot(LivePathEffectObject *lpeobject) :
add_other_stroke_width(_("_Crossing path stroke width"), _("Add crossed stroke width to the interruption size"), "add_other_stroke_width", &wr, this, true),
switcher_size(_("S_witcher size:"), _("Orientation indicator/switcher size"), "switcher_size", &wr, this, 15),
crossing_points_vector(_("Crossing Signs"), _("Crossings signs"), "crossing_points_vector", &wr, this),
- gpaths(),gstroke_widths()
+ crossing_points(),
+ gpaths(),
+ gstroke_widths(),
+ selectedCrossing(0),
+ switcher(0.,0.)
{
// register all your parameters here, so Inkscape knows which parameters this effect has:
registerParameter( dynamic_cast<Parameter *>(&interruption_width) );
@@ -363,10 +367,6 @@ LPEKnot::LPEKnot(LivePathEffectObject *lpeobject) :
registerParameter( dynamic_cast<Parameter *>(&switcher_size) );
registerParameter( dynamic_cast<Parameter *>(&crossing_points_vector) );
- crossing_points = LPEKnotNS::CrossingPoints();
- selectedCrossing = 0;
- switcher = Geom::Point(0,0);
-
_provides_knotholder_entities = true;
}
@@ -386,9 +386,7 @@ LPEKnot::updateSwitcher(){
//std::cout<<"placing switcher at "<<switcher<<" \n";
}else{
//std::cout<<"hiding switcher!\n";
- //TODO: is there a way to properly hide the helper.
- //switcher = Geom::Point(Geom::infinity(),Geom::infinity());
- switcher = Geom::Point(1e10,1e10);
+ switcher = Geom::Point(Geom::infinity(),Geom::infinity());
}
}
@@ -543,8 +541,9 @@ LPEKnot::doBeforeEffect (SPLPEItem const* lpeitem)
supplied_path = SP_PATH(lpeitem)->getCurve()->get_pathvector();
}
- gpaths = std::vector<Geom::Path>();
- gstroke_widths = std::vector<double>();
+ gpaths.clear();
+ gstroke_widths.clear();
+
collectPathsAndWidths(lpeitem, gpaths, gstroke_widths);
// std::cout<<"\nPaths on input:\n";
@@ -590,7 +589,10 @@ LPEKnot::doBeforeEffect (SPLPEItem const* lpeitem)
// std::cout<<crossing_points[toto].sign<<"),";
// }
crossing_points.inherit_signs(old_crdata);
- crossing_points_vector.param_set_and_write_new_value(crossing_points.to_vector());
+
+ // Don't write to XML here, only store it in the param itself. Will be written to SVG later
+ crossing_points_vector.param_setValue(crossing_points.to_vector());
+
updateSwitcher();
}
diff --git a/src/live_effects/lpe-knot.h b/src/live_effects/lpe-knot.h
index 12ab32e5b..080f32de2 100644
--- a/src/live_effects/lpe-knot.h
+++ b/src/live_effects/lpe-knot.h
@@ -75,7 +75,6 @@ private:
BoolParam add_stroke_width;
BoolParam add_other_stroke_width;
ScalarParam switcher_size;
- double stroke_width;
ArrayParam<double> crossing_points_vector;//svg storage of crossing_points
LPEKnotNS::CrossingPoints crossing_points;//topology representation of the knot.