summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-03 20:51:05 +0000
committerjabiertxof <info@marker.es>2016-10-03 20:51:05 +0000
commit4db35e8a6706ddece9e977e5f26d4a6867ff8cbe (patch)
treef9711f260f694d96e26bf3216fb64f2b38611b2b /src/live_effects
parentupdate to trunk (diff)
parentMerge in jabiertxof's hover information for measure tool (diff)
downloadinkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.tar.gz
inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.zip
Update to trunk
(bzr r15017.1.35)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/Makefile_insert117
-rw-r--r--src/live_effects/effect.cpp35
-rw-r--r--src/live_effects/effect.h1
-rw-r--r--src/live_effects/lpe-angle_bisector.cpp1
-rw-r--r--src/live_effects/lpe-attach-path.cpp7
-rw-r--r--src/live_effects/lpe-bendpath.cpp16
-rw-r--r--src/live_effects/lpe-bounding-box.cpp4
-rw-r--r--src/live_effects/lpe-circle_3pts.cpp1
-rw-r--r--src/live_effects/lpe-circle_with_radius.cpp1
-rw-r--r--src/live_effects/lpe-constructgrid.cpp3
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp4
-rw-r--r--src/live_effects/lpe-curvestitch.cpp8
-rw-r--r--src/live_effects/lpe-dynastroke.cpp6
-rw-r--r--src/live_effects/lpe-ellipse_5pts.cpp1
-rw-r--r--src/live_effects/lpe-envelope.cpp14
-rw-r--r--src/live_effects/lpe-extrude.cpp5
-rw-r--r--src/live_effects/lpe-fill-between-many.cpp3
-rw-r--r--src/live_effects/lpe-fill-between-strokes.cpp3
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp5
-rw-r--r--src/live_effects/lpe-gears.cpp25
-rw-r--r--src/live_effects/lpe-gears.h1
-rw-r--r--src/live_effects/lpe-interpolate.cpp3
-rw-r--r--src/live_effects/lpe-interpolate_points.cpp2
-rw-r--r--src/live_effects/lpe-jointype.cpp4
-rw-r--r--src/live_effects/lpe-knot.cpp7
-rw-r--r--src/live_effects/lpe-lattice.cpp14
-rw-r--r--src/live_effects/lpe-lattice2.cpp15
-rw-r--r--src/live_effects/lpe-line_segment.cpp4
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp46
-rw-r--r--src/live_effects/lpe-mirror_symmetry.h1
-rw-r--r--src/live_effects/lpe-offset.cpp4
-rw-r--r--src/live_effects/lpe-parallel.cpp4
-rw-r--r--src/live_effects/lpe-path_length.cpp2
-rw-r--r--src/live_effects/lpe-patternalongpath.cpp19
-rw-r--r--src/live_effects/lpe-perp_bisector.cpp3
-rw-r--r--src/live_effects/lpe-perspective-envelope.cpp5
-rw-r--r--src/live_effects/lpe-perspective_path.cpp15
-rw-r--r--src/live_effects/lpe-powerstroke.cpp15
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp6
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp8
-rw-r--r--src/live_effects/lpe-roughen.cpp5
-rw-r--r--src/live_effects/lpe-ruler.cpp4
-rw-r--r--src/live_effects/lpe-show_handles.cpp1
-rw-r--r--src/live_effects/lpe-simplify.cpp9
-rw-r--r--src/live_effects/lpe-skeleton.cpp4
-rw-r--r--src/live_effects/lpe-sketch.cpp8
-rw-r--r--src/live_effects/lpe-spiro.cpp3
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp4
-rw-r--r--src/live_effects/lpe-taperstroke.cpp8
-rw-r--r--src/live_effects/lpe-test-doEffect-stack.cpp3
-rw-r--r--src/live_effects/lpe-transform_2pts.cpp3
-rw-r--r--src/live_effects/lpe-vonkoch.cpp2
-rw-r--r--src/live_effects/lpegroupbbox.cpp2
-rw-r--r--src/live_effects/lpeobject-reference.cpp1
-rw-r--r--src/live_effects/lpeobject.cpp3
-rw-r--r--src/live_effects/parameter/Makefile_insert38
-rw-r--r--src/live_effects/parameter/togglebutton.cpp8
-rw-r--r--src/live_effects/spiro.cpp1
58 files changed, 78 insertions, 467 deletions
diff --git a/src/live_effects/Makefile_insert b/src/live_effects/Makefile_insert
deleted file mode 100644
index d227d379d..000000000
--- a/src/live_effects/Makefile_insert
+++ /dev/null
@@ -1,117 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- live_effects/effect.cpp \
- live_effects/effect.h \
- live_effects/effect-enum.h \
- live_effects/lpeobject.cpp \
- live_effects/lpeobject.h \
- live_effects/lpegroupbbox.cpp \
- live_effects/lpegroupbbox.h \
- live_effects/lpeobject-reference.cpp \
- live_effects/lpeobject-reference.h \
- live_effects/lpe-patternalongpath.cpp \
- live_effects/lpe-patternalongpath.h \
- live_effects/lpe-bendpath.cpp \
- live_effects/lpe-bendpath.h \
- live_effects/lpe-dynastroke.cpp \
- live_effects/lpe-dynastroke.h \
- live_effects/lpe-extrude.cpp \
- live_effects/lpe-extrude.h \
- live_effects/lpe-sketch.cpp \
- live_effects/lpe-sketch.h \
- live_effects/lpe-knot.cpp \
- live_effects/lpe-knot.h \
- live_effects/lpe-vonkoch.cpp \
- live_effects/lpe-vonkoch.h \
- live_effects/lpe-rough-hatches.cpp \
- live_effects/lpe-rough-hatches.h \
- live_effects/lpe-curvestitch.cpp \
- live_effects/lpe-curvestitch.h \
- live_effects/lpe-constructgrid.cpp \
- live_effects/lpe-constructgrid.h \
- live_effects/lpe-fillet-chamfer.cpp \
- live_effects/lpe-fillet-chamfer.h \
- live_effects/lpe-gears.cpp \
- live_effects/lpe-gears.h \
- live_effects/lpe-interpolate.cpp \
- live_effects/lpe-interpolate.h \
- live_effects/lpe-interpolate_points.cpp \
- live_effects/lpe-interpolate_points.h \
- live_effects/lpe-test-doEffect-stack.cpp \
- live_effects/lpe-test-doEffect-stack.h \
- live_effects/lpe-bspline.cpp \
- live_effects/lpe-bspline.h \
- live_effects/lpe-lattice.cpp \
- live_effects/lpe-lattice.h \
- live_effects/lpe-lattice2.cpp \
- live_effects/lpe-lattice2.h \
- live_effects/lpe-roughen.cpp \
- live_effects/lpe-roughen.h \
- live_effects/lpe-show_handles.cpp \
- live_effects/lpe-show_handles.h \
- live_effects/lpe-simplify.cpp \
- live_effects/lpe-simplify.h \
- live_effects/lpe-envelope.cpp \
- live_effects/lpe-envelope.h \
- live_effects/lpe-spiro.cpp \
- live_effects/lpe-spiro.h \
- live_effects/lpe-tangent_to_curve.cpp \
- live_effects/lpe-tangent_to_curve.h \
- live_effects/lpe-perp_bisector.cpp \
- live_effects/lpe-perp_bisector.h \
- live_effects/spiro.h \
- live_effects/spiro.cpp \
- live_effects/spiro-converters.h \
- live_effects/spiro-converters.cpp \
- live_effects/lpe-circle_with_radius.cpp \
- live_effects/lpe-circle_with_radius.h \
- live_effects/lpe-perspective_path.cpp \
- live_effects/lpe-perspective_path.h \
- live_effects/lpe-perspective-envelope.cpp \
- live_effects/lpe-perspective-envelope.h \
- live_effects/lpe-measure-line.cpp \
- live_effects/lpe-measure-line.h \
- live_effects/lpe-mirror_symmetry.cpp \
- live_effects/lpe-mirror_symmetry.h \
- live_effects/lpe-circle_3pts.cpp \
- live_effects/lpe-circle_3pts.h \
- live_effects/lpe-transform_2pts.cpp \
- live_effects/lpe-transform_2pts.h \
- live_effects/lpe-angle_bisector.cpp \
- live_effects/lpe-angle_bisector.h \
- live_effects/lpe-parallel.cpp \
- live_effects/lpe-parallel.h \
- live_effects/lpe-copy_rotate.cpp \
- live_effects/lpe-copy_rotate.h \
- live_effects/lpe-powerstroke.cpp \
- live_effects/lpe-powerstroke.h \
- live_effects/lpe-powerstroke-interpolators.h \
- live_effects/lpe-offset.cpp \
- live_effects/lpe-offset.h \
- live_effects/lpe-clone-original.cpp \
- live_effects/lpe-clone-original.h \
- live_effects/lpe-ruler.cpp \
- live_effects/lpe-ruler.h \
- live_effects/lpe-recursiveskeleton.cpp \
- live_effects/lpe-recursiveskeleton.h \
- live_effects/lpe-text_label.cpp \
- live_effects/lpe-text_label.h \
- live_effects/lpe-path_length.cpp \
- live_effects/lpe-path_length.h \
- live_effects/lpe-line_segment.cpp \
- live_effects/lpe-line_segment.h \
- live_effects/lpe-bounding-box.cpp \
- live_effects/lpe-bounding-box.h \
- live_effects/lpe-attach-path.cpp \
- live_effects/lpe-attach-path.h \
- live_effects/lpe-fill-between-strokes.cpp \
- live_effects/lpe-fill-between-strokes.h \
- live_effects/lpe-fill-between-many.cpp \
- live_effects/lpe-fill-between-many.h \
- live_effects/lpe-ellipse_5pts.cpp \
- live_effects/lpe-ellipse_5pts.h \
- live_effects/lpe-jointype.cpp \
- live_effects/lpe-jointype.h \
- live_effects/lpe-taperstroke.cpp \
- live_effects/lpe-taperstroke.h
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 7efc1a711..792bb5d7a 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -8,12 +8,11 @@
//#define LPE_ENABLE_TEST_EFFECTS //uncomment for toy effects
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
// include effects:
#include "live_effects/lpe-patternalongpath.h"
-#include "live_effects/effect.h"
#include "live_effects/lpe-angle_bisector.h"
#include "live_effects/lpe-attach-path.h"
#include "live_effects/lpe-bendpath.h"
@@ -65,30 +64,15 @@
#include "live_effects/lpe-vonkoch.h"
#include "xml/node-event-vector.h"
-#include "sp-object.h"
-#include "attributes.h"
#include "message-stack.h"
-#include "desktop.h"
-#include "inkscape.h"
-#include "document.h"
#include "document-private.h"
-#include "xml/document.h"
-#include <glibmm/i18n.h>
#include "ui/tools/pen-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/tools-switch.h"
#include "knotholder.h"
-#include "sp-lpe-item.h"
#include "live_effects/lpeobject.h"
-#include "live_effects/parameter/parameter.h"
-#include <glibmm/ustring.h>
#include "display/curve.h"
-#include <exception>
-
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/affine.h>
-#include <2geom/pathvector.h>
-
namespace Inkscape {
@@ -480,6 +464,7 @@ void Effect::doBeforeEffect_impl(SPLPEItem const* lpeitem)
sp_lpe_item->apply_to_clippath(sp_lpe_item);
sp_lpe_item->apply_to_mask(sp_lpe_item);
}
+ update_helperpath();
}
/**
@@ -669,6 +654,20 @@ Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathV
{
}
+/**
+ * Call to a method on nodetool to update the helper path from the effect
+ */
+void
+Effect::update_helperpath() {
+ using namespace Inkscape::UI;
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ if (desktop) {
+ if (tools_isactive(desktop, TOOLS_NODES)) {
+ Inkscape::UI::Tools::NodeTool *nt = static_cast<Inkscape::UI::Tools::NodeTool*>(desktop->event_context);
+ nt->update_helperpath();
+ }
+ }
+}
/**
* This *creates* a new widget, management of deletion should be done by the caller
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index f54624302..5ca53486c 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -102,6 +102,7 @@ public:
virtual LPEPathFlashType pathFlashType() const { return DEFAULT; }
void addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
std::vector<Geom::PathVector> getCanvasIndicators(SPLPEItem const* lpeitem);
+ void update_helperpath();
inline bool providesOwnFlashPaths() const {
return provides_own_flash_paths || show_orig_path;
diff --git a/src/live_effects/lpe-angle_bisector.cpp b/src/live_effects/lpe-angle_bisector.cpp
index 900d29e3a..9bfbf4ca8 100644
--- a/src/live_effects/lpe-angle_bisector.cpp
+++ b/src/live_effects/lpe-angle_bisector.cpp
@@ -12,7 +12,6 @@
#include "live_effects/lpe-angle_bisector.h"
-#include <2geom/path.h>
#include <2geom/sbasis-to-bezier.h>
#include "sp-lpe-item.h"
diff --git a/src/live_effects/lpe-attach-path.cpp b/src/live_effects/lpe-attach-path.cpp
index 21459f322..d2b44dd4e 100644
--- a/src/live_effects/lpe-attach-path.cpp
+++ b/src/live_effects/lpe-attach-path.cpp
@@ -10,16 +10,9 @@
#include "live_effects/lpe-attach-path.h"
#include "display/curve.h"
-#include "sp-item.h"
-#include "2geom/path.h"
#include "sp-shape.h"
#include "sp-text.h"
-#include "2geom/bezier-curve.h"
#include "2geom/path-sink.h"
-#include "parameter/parameter.h"
-#include "live_effects/parameter/point.h"
-#include "parameter/originalpath.h"
-#include "2geom/affine.h"
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp
index bc112285f..c24d38d7b 100644
--- a/src/live_effects/lpe-bendpath.cpp
+++ b/src/live_effects/lpe-bendpath.cpp
@@ -6,27 +6,11 @@
*/
#include "live_effects/lpe-bendpath.h"
-#include "sp-shape.h"
-#include "sp-item.h"
-#include "sp-path.h"
#include "sp-item-group.h"
-#include "svg/svg.h"
-#include "ui/widget/scalar.h"
-
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
-#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/piecewise.h>
#include "knot-holder-entity.h"
#include "knotholder.h"
-#include <glibmm/i18n.h>
-
-#include <algorithm>
-
using std::vector;
diff --git a/src/live_effects/lpe-bounding-box.cpp b/src/live_effects/lpe-bounding-box.cpp
index 43a60d482..cfe1f5165 100644
--- a/src/live_effects/lpe-bounding-box.cpp
+++ b/src/live_effects/lpe-bounding-box.cpp
@@ -9,12 +9,8 @@
#include "live_effects/lpe-bounding-box.h"
#include "display/curve.h"
-#include "sp-item.h"
-#include "2geom/path.h"
#include "sp-shape.h"
#include "sp-text.h"
-#include "2geom/bezier-curve.h"
-#include "lpe-bounding-box.h"
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-circle_3pts.cpp b/src/live_effects/lpe-circle_3pts.cpp
index dbb1f4b6b..18252f6a0 100644
--- a/src/live_effects/lpe-circle_3pts.cpp
+++ b/src/live_effects/lpe-circle_3pts.cpp
@@ -15,7 +15,6 @@
#include "live_effects/lpe-circle_3pts.h"
// You might need to include other 2geom files. You can add them here:
-#include <2geom/path.h>
#include <2geom/circle.h>
#include <2geom/path-sink.h>
diff --git a/src/live_effects/lpe-circle_with_radius.cpp b/src/live_effects/lpe-circle_with_radius.cpp
index 8f2156044..6e03cb1ce 100644
--- a/src/live_effects/lpe-circle_with_radius.cpp
+++ b/src/live_effects/lpe-circle_with_radius.cpp
@@ -15,7 +15,6 @@
#include "display/curve.h"
// You might need to include other 2geom files. You can add them here:
-#include <2geom/pathvector.h>
#include <2geom/circle.h>
#include <2geom/path-sink.h>
diff --git a/src/live_effects/lpe-constructgrid.cpp b/src/live_effects/lpe-constructgrid.cpp
index b1e0edaac..4af8891e8 100644
--- a/src/live_effects/lpe-constructgrid.cpp
+++ b/src/live_effects/lpe-constructgrid.cpp
@@ -14,9 +14,6 @@
#include "live_effects/lpe-constructgrid.h"
-#include <2geom/path.h>
-#include <2geom/transforms.h>
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 80f5bdafd..f28ab4b31 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -15,11 +15,7 @@
#include <2geom/path-intersection.h>
#include <2geom/sbasis-to-bezier.h>
#include "live_effects/lpe-copy_rotate.h"
-#include <2geom/path.h>
-#include <2geom/transforms.h>
-#include <2geom/angle.h>
-#include "knot-holder-entity.h"
#include "knotholder.h"
// TODO due to internal breakage in glibmm headers, this must be last:
#include <glibmm/i18n.h>
diff --git a/src/live_effects/lpe-curvestitch.cpp b/src/live_effects/lpe-curvestitch.cpp
index 609447f26..3beedaf57 100644
--- a/src/live_effects/lpe-curvestitch.cpp
+++ b/src/live_effects/lpe-curvestitch.cpp
@@ -17,19 +17,11 @@
#include "live_effects/lpe-curvestitch.h"
-#include "sp-item.h"
#include "sp-path.h"
#include "svg/svg.h"
#include "xml/repr.h"
-#include <2geom/path.h>
-#include <2geom/piecewise.h>
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/affine.h>
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-dynastroke.cpp b/src/live_effects/lpe-dynastroke.cpp
index aeecd5d5c..7e22f6e51 100644
--- a/src/live_effects/lpe-dynastroke.cpp
+++ b/src/live_effects/lpe-dynastroke.cpp
@@ -14,14 +14,8 @@
#include "display/curve.h"
//# include <libnr/n-art-bpath.h>
-#include <2geom/path.h>
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
#include <2geom/sbasis-math.h>
-#include <2geom/piecewise.h>
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-ellipse_5pts.cpp b/src/live_effects/lpe-ellipse_5pts.cpp
index 088d24b9c..0371fc313 100644
--- a/src/live_effects/lpe-ellipse_5pts.cpp
+++ b/src/live_effects/lpe-ellipse_5pts.cpp
@@ -15,7 +15,6 @@
// You might need to include other 2geom files. You can add them here:
#include <glibmm/i18n.h>
-#include <2geom/path.h>
#include <2geom/circle.h>
#include <2geom/ellipse.h>
#include <2geom/path-sink.h>
diff --git a/src/live_effects/lpe-envelope.cpp b/src/live_effects/lpe-envelope.cpp
index e873c0b15..0ce784877 100644
--- a/src/live_effects/lpe-envelope.cpp
+++ b/src/live_effects/lpe-envelope.cpp
@@ -5,22 +5,8 @@
*/
#include "live_effects/lpe-envelope.h"
-#include "sp-shape.h"
-#include "sp-item.h"
-#include "sp-path.h"
-#include "sp-item-group.h"
#include "display/curve.h"
-#include "svg/svg.h"
-#include "ui/widget/scalar.h"
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
-#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/piecewise.h>
-
-#include <algorithm>
using std::vector;
namespace Inkscape {
diff --git a/src/live_effects/lpe-extrude.cpp b/src/live_effects/lpe-extrude.cpp
index dd1a8c824..d22007f76 100644
--- a/src/live_effects/lpe-extrude.cpp
+++ b/src/live_effects/lpe-extrude.cpp
@@ -15,11 +15,6 @@
#include <glibmm/i18n.h>
-#include <2geom/path.h>
-#include <2geom/piecewise.h>
-#include <2geom/transforms.h>
-#include <algorithm>
-
#include "sp-item.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-fill-between-many.cpp b/src/live_effects/lpe-fill-between-many.cpp
index 574ec3580..ccb9cf56d 100644
--- a/src/live_effects/lpe-fill-between-many.cpp
+++ b/src/live_effects/lpe-fill-between-many.cpp
@@ -9,11 +9,8 @@
#include "live_effects/lpe-fill-between-many.h"
#include "display/curve.h"
-#include "sp-item.h"
-#include "2geom/path.h"
#include "sp-shape.h"
#include "sp-text.h"
-#include "2geom/bezier-curve.h"
#include <glibmm/i18n.h>
diff --git a/src/live_effects/lpe-fill-between-strokes.cpp b/src/live_effects/lpe-fill-between-strokes.cpp
index 89ea80545..b1e328d18 100644
--- a/src/live_effects/lpe-fill-between-strokes.cpp
+++ b/src/live_effects/lpe-fill-between-strokes.cpp
@@ -9,11 +9,8 @@
#include "live_effects/lpe-fill-between-strokes.h"
#include "display/curve.h"
-#include "sp-item.h"
-#include "2geom/path.h"
#include "sp-shape.h"
#include "sp-text.h"
-#include "2geom/bezier-curve.h"
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index 07760b172..24ee2ccc3 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -17,21 +17,16 @@
#include <2geom/sbasis-to-bezier.h>
#include <2geom/elliptical-arc.h>
-#include <2geom/line.h>
-#include "desktop.h"
#include "display/curve.h"
#include "helper/geom-nodetype.h"
#include "helper/geom-curves.h"
#include "helper/geom.h"
-#include "live_effects/parameter/filletchamferpointarray.h"
-
// for programmatically updating knots
#include "ui/tools-switch.h"
// TODO due to internal breakage in glibmm headers, this must be last:
-#include <glibmm/i18n.h>
using namespace Geom;
namespace Inkscape {
diff --git a/src/live_effects/lpe-gears.cpp b/src/live_effects/lpe-gears.cpp
index d4d695542..1d5398aa5 100644
--- a/src/live_effects/lpe-gears.cpp
+++ b/src/live_effects/lpe-gears.cpp
@@ -8,14 +8,9 @@
#include "live_effects/lpe-gears.h"
-#include <vector>
-
#include <glibmm/i18n.h>
-#include <2geom/d2.h>
-#include <2geom/sbasis.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/path.h>
using std::vector;
using namespace Geom;
@@ -212,7 +207,8 @@ namespace LivePathEffect {
LPEGears::LPEGears(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
teeth(_("_Teeth:"), _("The number of teeth"), "teeth", &wr, this, 10),
- phi(_("_Phi:"), _("Tooth pressure angle (typically 20-25 deg). The ratio of teeth not in contact."), "phi", &wr, this, 5)
+ phi(_("_Phi:"), _("Tooth pressure angle (typically 20-25 deg). The ratio of teeth not in contact."), "phi", &wr, this, 5),
+ min_radius(_("Min Radius:"), _("Minimun radius, low balues can slow"), "min_radius", &wr, this, 5.0)
{
/* Tooth pressure angle: The angle between the tooth profile and a perpendicular to the pitch
* circle, usually at the point where the pitch circle meets the tooth profile. Standard angles
@@ -223,8 +219,10 @@ LPEGears::LPEGears(LivePathEffectObject *lpeobject) :
teeth.param_make_integer();
teeth.param_set_range(3, 1e10);
- registerParameter( dynamic_cast<Parameter *>(&teeth) );
- registerParameter( dynamic_cast<Parameter *>(&phi) );
+ min_radius.param_set_range(0.01, 9999.0);
+ registerParameter(&teeth);
+ registerParameter(&phi);
+ registerParameter(&min_radius);
}
LPEGears::~LPEGears()
@@ -247,12 +245,17 @@ LPEGears::doEffect_path (Geom::PathVector const &path_in)
gear->angle(atan2((*it).initialPoint() - gear_centre));
++it;
- if ( it == gearpath.end() ) return path_out;
- gear->pitch_radius(Geom::distance(gear_centre, (*it).finalPoint()));
+ if ( it == gearpath.end() ) return path_out;
+ double radius = Geom::distance(gear_centre, (*it).finalPoint());
+ radius = radius < min_radius?min_radius:radius;
+ gear->pitch_radius(radius);
path_out.push_back( gear->path());
-
+
for (++it; it != gearpath.end() ; ++it) {
+ if (are_near((*it).initialPoint(), (*it).finalPoint())) {
+ continue;
+ }
// iterate through Geom::Curve in path_in
Gear* gearnew = new Gear(gear->spawn( (*it).finalPoint() ));
path_out.push_back( gearnew->path() );
diff --git a/src/live_effects/lpe-gears.h b/src/live_effects/lpe-gears.h
index 5dd6dd239..57b49d2b5 100644
--- a/src/live_effects/lpe-gears.h
+++ b/src/live_effects/lpe-gears.h
@@ -27,6 +27,7 @@ public:
private:
ScalarParam teeth;
ScalarParam phi;
+ ScalarParam min_radius;
LPEGears(const LPEGears&);
LPEGears& operator=(const LPEGears&);
diff --git a/src/live_effects/lpe-interpolate.cpp b/src/live_effects/lpe-interpolate.cpp
index 74c7efd90..43da4d105 100644
--- a/src/live_effects/lpe-interpolate.cpp
+++ b/src/live_effects/lpe-interpolate.cpp
@@ -14,10 +14,7 @@
#include "live_effects/lpe-interpolate.h"
-#include <2geom/path.h>
#include <2geom/sbasis-to-bezier.h>
-#include <2geom/piecewise.h>
-#include <2geom/sbasis-geometric.h>
#include "sp-path.h"
#include "display/curve.h"
diff --git a/src/live_effects/lpe-interpolate_points.cpp b/src/live_effects/lpe-interpolate_points.cpp
index cf70832ee..ab0576174 100644
--- a/src/live_effects/lpe-interpolate_points.cpp
+++ b/src/live_effects/lpe-interpolate_points.cpp
@@ -13,8 +13,6 @@
#include "live_effects/lpe-interpolate_points.h"
-#include <2geom/path.h>
-
#include "live_effects/lpe-powerstroke-interpolators.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-jointype.cpp b/src/live_effects/lpe-jointype.cpp
index fe42932be..3bfbd6288 100644
--- a/src/live_effects/lpe-jointype.cpp
+++ b/src/live_effects/lpe-jointype.cpp
@@ -10,16 +10,12 @@
#include "live_effects/parameter/enum.h"
#include "helper/geom-pathstroke.h"
-#include "sp-shape.h"
#include "style.h"
-#include "xml/repr.h"
-#include "sp-paint-server.h"
#include "svg/svg-color.h"
#include "desktop-style.h"
#include "svg/css-ostringstream.h"
#include "display/curve.h"
-#include <2geom/path.h>
#include <2geom/elliptical-arc.h>
#include "lpe-jointype.h"
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 09f35f05e..fbc32cf3e 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -16,7 +16,6 @@
#include "sp-path.h"
#include "display/curve.h"
#include "live_effects/lpe-knot.h"
-#include "svg/svg.h"
#include "style.h"
#include "knot-holder-entity.h"
#include "knotholder.h"
@@ -25,20 +24,14 @@
#include <gdk/gdk.h>
#include <2geom/sbasis-to-bezier.h>
-#include <2geom/sbasis.h>
-#include <2geom/d2.h>
-#include <2geom/path.h>
#include <2geom/bezier-to-sbasis.h>
#include <2geom/basic-intersection.h>
-#include <2geom/exception.h>
// for change crossing undo
#include "verbs.h"
#include "document.h"
#include "document-undo.h"
-#include <exception>
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-lattice.cpp b/src/live_effects/lpe-lattice.cpp
index 3c23e349e..091b6ddca 100644
--- a/src/live_effects/lpe-lattice.cpp
+++ b/src/live_effects/lpe-lattice.cpp
@@ -6,7 +6,7 @@
* Authors:
* Johan Engelen <j.b.c.engelen@utwente.nl>
* Steren Giannini
- * Noé Falzon
+ * No� Falzon
* Victor Navez
*
* Copyright (C) 2007-2008 Authors
@@ -16,22 +16,10 @@
#include "live_effects/lpe-lattice.h"
-#include "sp-shape.h"
-#include "sp-item.h"
-#include "sp-path.h"
#include "display/curve.h"
-#include "svg/svg.h"
-#include <2geom/sbasis.h>
#include <2geom/sbasis-2d.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/piecewise.h>
-#include <2geom/transforms.h>
-
-#include "desktop.h" // TODO: should be factored out (see below)
using namespace Geom;
diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp
index bacbe5fa7..9e9fc153a 100644
--- a/src/live_effects/lpe-lattice2.cpp
+++ b/src/live_effects/lpe-lattice2.cpp
@@ -6,7 +6,7 @@
* Authors:
* Johan Engelen <j.b.c.engelen@utwente.nl>
* Steren Giannini
- * Noé Falzon
+ * No� Falzon
* Victor Navez
* ~suv
* Jabiertxo Arraiza
@@ -17,24 +17,11 @@
*/
#include "live_effects/lpe-lattice2.h"
-#include "sp-shape.h"
-#include "sp-item.h"
-#include "sp-path.h"
#include "display/curve.h"
-#include "svg/svg.h"
#include "helper/geom.h"
-#include <2geom/path.h>
-#include <2geom/sbasis.h>
#include <2geom/sbasis-2d.h>
-#include "helper/geom-curves.h"
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/piecewise.h>
-#include <2geom/transforms.h>
// TODO due to internal breakage in glibmm headers, this must be last:
-#include <glibmm/i18n.h>
using namespace Geom;
diff --git a/src/live_effects/lpe-line_segment.cpp b/src/live_effects/lpe-line_segment.cpp
index dfd8aea8f..4c9edabd4 100644
--- a/src/live_effects/lpe-line_segment.cpp
+++ b/src/live_effects/lpe-line_segment.cpp
@@ -14,10 +14,6 @@
#include "live_effects/lpe-line_segment.h"
#include "ui/tools/lpe-tool.h"
-#include <2geom/pathvector.h>
-#include <2geom/geom.h>
-#include <2geom/bezier-curve.h>
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index cf866ad6a..4deb29d8f 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -14,29 +14,22 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-mirror_symmetry.h"
-#include <sp-path.h>
#include <display/curve.h>
#include <svg/path-string.h>
#include "helper/geom.h"
-#include <2geom/path.h>
#include <2geom/path-intersection.h>
-#include <2geom/transforms.h>
-#include <2geom/affine.h>
-#include "knot-holder-entity.h"
#include "knotholder.h"
-#include "inkscape.h"
// TODO due to internal breakage in glibmm headers, this must be last:
-#include <glibmm/i18n.h>
namespace Inkscape {
namespace LivePathEffect {
static const Util::EnumData<ModeType> ModeTypeData[MT_END] = {
- { MT_V, N_("Vertical Page Center"), "Vertical Page Center, use select tool to move item instead line" },
- { MT_H, N_("Horizontal Page Center"), "Horizontal Page Center, use select tool to move item instead line" },
- { MT_FREE, N_("Free from reflection line"), "Free from path" },
- { MT_X, N_("X from middle knot"), "X from middle knot" },
- { MT_Y, N_("Y from middle knot"), "Y from middle knot" }
+ { MT_V, N_("Vertical Page Center"), "vertical" },
+ { MT_H, N_("Horizontal Page Center"), "horizontal" },
+ { MT_FREE, N_("Free from reflection line"), "free" },
+ { MT_X, N_("X from middle knot"), "X" },
+ { MT_Y, N_("Y from middle knot"), "Y" }
};
static const Util::EnumDataConverter<ModeType>
MTConverter(ModeTypeData, MT_END);
@@ -94,7 +87,7 @@ void
LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem)
{
using namespace Geom;
-
+ original_bbox(lpeitem);
Point point_a(boundingbox_X.max(), boundingbox_Y.min());
Point point_b(boundingbox_X.max(), boundingbox_Y.max());
Point point_c(boundingbox_X.max(), boundingbox_Y.middle());
@@ -152,6 +145,18 @@ LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem)
}
void
+LPEMirrorSymmetry::transform_multiply(Geom::Affine const& postmul, bool set)
+{
+ center_point *= postmul;
+ previous_center = center_point;
+ // cycle through all parameters. Most parameters will not need transformation, but path and point params do.
+ for (std::vector<Parameter *>::iterator it = param_vector.begin(); it != param_vector.end(); ++it) {
+ Parameter * param = *it;
+ param->param_transform_multiply(postmul, set);
+ }
+}
+
+void
LPEMirrorSymmetry::doOnApply (SPLPEItem const* lpeitem)
{
using namespace Geom;
@@ -185,10 +190,13 @@ LPEMirrorSymmetry::doEffect_path (Geom::PathVector const & path_in)
Geom::Translate m1(point_a[0], point_a[1]);
double hyp = Geom::distance(point_a, point_b);
- double c = (point_b[0] - point_a[0]) / hyp; // cos(alpha)
- double s = (point_b[1] - point_a[1]) / hyp; // sin(alpha)
-
- Geom::Affine m2(c, -s, s, c, 0.0, 0.0);
+ double cos = 0;
+ double sin = 0;
+ if (hyp > 0) {
+ cos = (point_b[0] - point_a[0]) / hyp;
+ sin = (point_b[1] - point_a[1]) / hyp;
+ }
+ Geom::Affine m2(cos, -sin, sin, cos, 0.0, 0.0);
Geom::Scale sca(1.0, -1.0);
Geom::Affine m = m1.inverse() * m2;
@@ -299,8 +307,8 @@ LPEMirrorSymmetry::doEffect_path (Geom::PathVector const & path_in)
}
if (!fuse_paths || discard_orig_path) {
- for (int i = 0; i < static_cast<int>(path_in.size()); ++i) {
- path_out.push_back(path_in[i] * m);
+ for (size_t i = 0; i < original_pathv.size(); ++i) {
+ path_out.push_back(original_pathv[i] * m);
}
}
diff --git a/src/live_effects/lpe-mirror_symmetry.h b/src/live_effects/lpe-mirror_symmetry.h
index 9e5b4d628..7ec4029e0 100644
--- a/src/live_effects/lpe-mirror_symmetry.h
+++ b/src/live_effects/lpe-mirror_symmetry.h
@@ -46,6 +46,7 @@ public:
virtual ~LPEMirrorSymmetry();
virtual void doOnApply (SPLPEItem const* lpeitem);
virtual void doBeforeEffect (SPLPEItem const* lpeitem);
+ virtual void transform_multiply(Geom::Affine const& postmul, bool set);
virtual Geom::PathVector doEffect_path (Geom::PathVector const & path_in);
/* the knotholder entity classes must be declared friends */
friend class MS::KnotHolderEntityCenterMirrorSymmetry;
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index d611b88a1..a0fa46c3f 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -17,11 +17,7 @@
#include "sp-shape.h"
#include "display/curve.h"
-#include <2geom/path.h>
-#include <2geom/piecewise.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/elliptical-arc.h>
-#include <2geom/transforms.h>
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp
index 23cd5e2e7..9cd8ecf46 100644
--- a/src/live_effects/lpe-parallel.cpp
+++ b/src/live_effects/lpe-parallel.cpp
@@ -17,10 +17,6 @@
#include "sp-shape.h"
#include "display/curve.h"
-#include <2geom/path.h>
-#include <2geom/transforms.h>
-
-#include "knot-holder-entity.h"
#include "knotholder.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp
index 4ca380c15..8fbf9d420 100644
--- a/src/live_effects/lpe-path_length.cpp
+++ b/src/live_effects/lpe-path_length.cpp
@@ -16,8 +16,6 @@
#include "live_effects/lpe-path_length.h"
#include "util/units.h"
-#include "2geom/sbasis-geometric.h"
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-patternalongpath.cpp b/src/live_effects/lpe-patternalongpath.cpp
index 911c410f9..0785da235 100644
--- a/src/live_effects/lpe-patternalongpath.cpp
+++ b/src/live_effects/lpe-patternalongpath.cpp
@@ -6,22 +6,13 @@
#include "live_effects/lpe-patternalongpath.h"
#include "live_effects/lpeobject.h"
-#include "sp-shape.h"
#include "display/curve.h"
-#include "svg/svg.h"
-#include "ui/widget/scalar.h"
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/piecewise.h>
-#include "knot-holder-entity.h"
#include "knotholder.h"
-
#include <algorithm>
+
using std::vector;
@@ -202,12 +193,12 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
case PAPCT_REPEATED_STRETCHED:
// if uskeleton is closed:
if(path_i.segs.front().at0() == path_i.segs.back().at1()){
- nbCopies = static_cast<int>(std::floor((uskeleton.domain().extent() - toffset)/(pattBndsX->extent()+xspace)));
+ nbCopies = std::max(1, static_cast<int>(std::floor((uskeleton.domain().extent() - toffset)/(pattBndsX->extent()+xspace))));
pattBndsX = Interval(pattBndsX->min(),pattBndsX->max()+xspace);
scaling = (uskeleton.domain().extent() - toffset)/(((double)nbCopies)*pattBndsX->extent());
// if not closed: no space at the end
}else{
- nbCopies = static_cast<int>(std::floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX->extent()+xspace)));
+ nbCopies = std::max(1, static_cast<int>(std::floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX->extent()+xspace))));
pattBndsX = Interval(pattBndsX->min(),pattBndsX->max()+xspace);
scaling = (uskeleton.domain().extent() - toffset)/(((double)nbCopies)*pattBndsX->extent() - xspace);
}
@@ -264,9 +255,11 @@ LPEPatternAlongPath::transform_multiply(Geom::Affine const& postmul, bool set)
bool transform_stroke = prefs ? prefs->getBool("/options/transform/stroke", true) : true;
if (transform_stroke && !scale_y_rel) {
prop_scale.param_set_value(prop_scale * ((postmul.expansionX() + postmul.expansionY()) / 2));
- }
+ prop_scale.write_to_SVG();
+ }
if (postmul.isTranslation()) {
pattern.param_transform_multiply(postmul, set);
+ pattern.write_to_SVG();
}
sp_lpe_item_update_patheffect (sp_lpe_item, false, true);
}
diff --git a/src/live_effects/lpe-perp_bisector.cpp b/src/live_effects/lpe-perp_bisector.cpp
index 660318c57..f69dae6a1 100644
--- a/src/live_effects/lpe-perp_bisector.cpp
+++ b/src/live_effects/lpe-perp_bisector.cpp
@@ -18,10 +18,7 @@
#include "display/curve.h"
#include "sp-path.h"
#include "line-geometry.h"
-#include "sp-lpe-item.h"
-#include <2geom/path.h>
-#include "knot-holder-entity.h"
#include "knotholder.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp
index ae951dfc9..6a6b59519 100644
--- a/src/live_effects/lpe-perspective-envelope.cpp
+++ b/src/live_effects/lpe-perspective-envelope.cpp
@@ -18,7 +18,6 @@
#include "live_effects/lpe-perspective-envelope.h"
#include "helper/geom.h"
#include "display/curve.h"
-#include "svg/svg.h"
#include <gsl/gsl_linalg.h>
using namespace Geom;
@@ -32,8 +31,8 @@ enum DeformationType {
};
static const Util::EnumData<unsigned> DeformationTypeData[] = {
- {DEFORMATION_PERSPECTIVE , N_("Perspective"), "Perspective"},
- {DEFORMATION_ENVELOPE , N_("Envelope deformation"), "Envelope deformation"}
+ {DEFORMATION_PERSPECTIVE , N_("Perspective"), "perspective"},
+ {DEFORMATION_ENVELOPE , N_("Envelope deformation"), "envelope_deformation"}
};
static const Util::EnumDataConverter<unsigned> DeformationTypeConverter(DeformationTypeData, sizeof(DeformationTypeData)/sizeof(*DeformationTypeData));
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index c8cdd7912..cb4e43d87 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -15,18 +15,13 @@
#include "persp3d.h"
//#include "transf_mat_3x4.h"
-#include "document.h"
#include "document-private.h"
#include "live_effects/lpe-perspective_path.h"
#include "live_effects/lpeobject.h"
-#include "sp-item-group.h"
#include "knot-holder-entity.h"
#include "knotholder.h"
#include "desktop.h"
#include <util/units.h>
-#include "inkscape.h"
-
-#include <2geom/path.h>
namespace Inkscape {
namespace LivePathEffect {
@@ -107,12 +102,12 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) {
perspectiveID = perspective->get_text();
Persp3D *first = 0;
Persp3D *persp = 0;
- for ( SPObject *child = this->lpeobj->document->getDefs()->firstChild(); child && !persp; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child) && first == 0) {
- first = SP_PERSP3D(child);
+ for (auto& child: lpeobj->document->getDefs()->children) {
+ if (SP_IS_PERSP3D(&child) && first == 0) {
+ first = SP_PERSP3D(&child);
}
- if (SP_IS_PERSP3D(child) && strcmp(child->getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
- persp = SP_PERSP3D(child);
+ if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
+ persp = SP_PERSP3D(&child);
break;
}
}
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index 66c8776b5..0de668847 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -13,32 +13,17 @@
#include "live_effects/lpe-powerstroke.h"
#include "live_effects/lpe-powerstroke-interpolators.h"
-#include "sp-shape.h"
#include "style.h"
-#include "xml/repr.h"
-#include "sp-paint-server.h"
#include "svg/svg-color.h"
#include "desktop-style.h"
#include "svg/css-ostringstream.h"
#include "display/curve.h"
-#include <2geom/path.h>
-#include <2geom/piecewise.h>
-#include <2geom/sbasis-geometric.h>
-#include <2geom/transforms.h>
-#include <2geom/bezier-utils.h>
#include <2geom/elliptical-arc.h>
-#include <2geom/sbasis-to-bezier.h>
#include <2geom/path-sink.h>
#include <2geom/path-intersection.h>
-#include <2geom/crossing.h>
-#include <2geom/ellipse.h>
#include <2geom/circle.h>
-#include <2geom/math-utils.h>
#include "helper/geom.h"
-#include <math.h>
-
-#include "spiro.h"
namespace Geom {
// should all be moved to 2geom at some point
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index ac571d963..ed0c915ce 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -14,13 +14,7 @@
#include "live_effects/lpe-recursiveskeleton.h"
-#include <2geom/path.h>
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/piecewise.h>
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index 76421e0f0..2fb65b349 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -18,18 +18,10 @@
#include "sp-item.h"
#include "sp-path.h"
-#include "svg/svg.h"
#include "xml/repr.h"
-#include <2geom/path.h>
-#include <2geom/piecewise.h>
-#include <2geom/sbasis.h>
#include <2geom/sbasis-math.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/affine.h>
namespace Inkscape {
diff --git a/src/live_effects/lpe-roughen.cpp b/src/live_effects/lpe-roughen.cpp
index 13f2b7b51..3a486ff10 100644
--- a/src/live_effects/lpe-roughen.cpp
+++ b/src/live_effects/lpe-roughen.cpp
@@ -14,15 +14,10 @@
*/
#include "live_effects/lpe-roughen.h"
-#include "desktop.h"
#include "display/curve.h"
-#include "live_effects/parameter/parameter.h"
#include <boost/functional/hash.hpp>
#include "helper/geom.h"
-#include "sp-item-group.h"
-#include <cmath>
// TODO due to internal breakage in glibmm headers, this must be last:
-#include <glibmm/i18n.h>
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp
index 49b5faa2e..3a2d78b2c 100644
--- a/src/live_effects/lpe-ruler.cpp
+++ b/src/live_effects/lpe-ruler.cpp
@@ -12,10 +12,6 @@
*/
#include "live_effects/lpe-ruler.h"
-#include <2geom/piecewise.h>
-#include <2geom/sbasis-geometric.h>
-#include "inkscape.h"
-#include "desktop.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-show_handles.cpp b/src/live_effects/lpe-show_handles.cpp
index 2d4666fe4..388ea176f 100644
--- a/src/live_effects/lpe-show_handles.cpp
+++ b/src/live_effects/lpe-show_handles.cpp
@@ -7,7 +7,6 @@
*/
#include "live_effects/lpe-show_handles.h"
-#include "live_effects/parameter/parameter.h"
#include <2geom/sbasis-to-bezier.h>
#include <2geom/svg-path-parser.h>
#include "helper/geom.h"
diff --git a/src/live_effects/lpe-simplify.cpp b/src/live_effects/lpe-simplify.cpp
index b0c1fbc23..ec21e10d2 100644
--- a/src/live_effects/lpe-simplify.cpp
+++ b/src/live_effects/lpe-simplify.cpp
@@ -4,20 +4,11 @@
#include "live_effects/lpe-simplify.h"
#include "display/curve.h"
-#include "live_effects/parameter/parameter.h"
#include "helper/geom.h"
-#include "livarot/Path.h"
-#include "splivarot.h"
#include <2geom/svg-path-parser.h>
-#include "desktop.h"
-#include "inkscape.h"
#include "svg/svg.h"
#include "ui/tools/node-tool.h"
-#include <2geom/d2.h>
-#include <2geom/generic-rect.h>
-#include <2geom/interval.h>
#include "ui/icon-names.h"
-#include "util/units.h"
// TODO due to internal breakage in glibmm headers, this must be last:
#include <glibmm/i18n.h>
diff --git a/src/live_effects/lpe-skeleton.cpp b/src/live_effects/lpe-skeleton.cpp
index 6e4afbe9b..7d34db699 100644
--- a/src/live_effects/lpe-skeleton.cpp
+++ b/src/live_effects/lpe-skeleton.cpp
@@ -21,13 +21,9 @@
#include "live_effects/lpe-skeleton.h"
// You might need to include other 2geom files. You can add them here:
-#include <2geom/path.h>
#include <glibmm/i18n.h>
-//#include "knot-holder-entity.h"
-//#include "knotholder.h"
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp
index 82d343f6e..95e2f6f0d 100644
--- a/src/live_effects/lpe-sketch.cpp
+++ b/src/live_effects/lpe-sketch.cpp
@@ -16,16 +16,8 @@
#include <glibmm/i18n.h>
// You might need to include other 2geom files. You can add them here:
-#include <2geom/path.h>
-#include <2geom/sbasis.h>
-#include <2geom/sbasis-geometric.h>
#include <2geom/sbasis-math.h>
#include <2geom/bezier-to-sbasis.h>
-#include <2geom/sbasis-to-bezier.h>
-#include <2geom/d2.h>
-#include <2geom/sbasis-math.h>
-#include <2geom/piecewise.h>
-#include <2geom/crossing.h>
#include <2geom/path-intersection.h>
namespace Inkscape {
diff --git a/src/live_effects/lpe-spiro.cpp b/src/live_effects/lpe-spiro.cpp
index 0d42596b2..4a41dc5a0 100644
--- a/src/live_effects/lpe-spiro.cpp
+++ b/src/live_effects/lpe-spiro.cpp
@@ -7,9 +7,6 @@
#include "live_effects/lpe-spiro.h"
#include "display/curve.h"
-#include <typeinfo>
-#include <2geom/pathvector.h>
-#include <2geom/affine.h>
#include <2geom/curves.h>
#include "helper/geom-nodetype.h"
#include "helper/geom-curves.h"
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index 978ab57fb..b308ef8d7 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -19,10 +19,6 @@
#include "sp-path.h"
#include "display/curve.h"
-#include <2geom/path.h>
-#include <2geom/transforms.h>
-
-#include "knot-holder-entity.h"
#include "knotholder.h"
namespace Inkscape {
diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp
index f2ddd4929..f6f6b33dc 100644
--- a/src/live_effects/lpe-taperstroke.cpp
+++ b/src/live_effects/lpe-taperstroke.cpp
@@ -13,28 +13,20 @@
#include "live_effects/lpe-taperstroke.h"
-#include <2geom/path.h>
-#include <2geom/path.h>
#include <2geom/circle.h>
#include <2geom/sbasis-to-bezier.h>
#include "helper/geom-nodetype.h"
#include "helper/geom-pathstroke.h"
#include "display/curve.h"
-#include "sp-shape.h"
#include "style.h"
-#include "xml/repr.h"
-#include "sp-paint-server.h"
#include "svg/svg-color.h"
#include "desktop-style.h"
#include "svg/css-ostringstream.h"
#include "svg/svg.h"
-#include "knot-holder-entity.h"
#include "knotholder.h"
-#include <glibmm/i18n.h>
-
template<typename T>
inline bool withinRange(T value, T low, T high) {
return (value > low && value < high);
diff --git a/src/live_effects/lpe-test-doEffect-stack.cpp b/src/live_effects/lpe-test-doEffect-stack.cpp
index 2bcd4c136..c7ecf6481 100644
--- a/src/live_effects/lpe-test-doEffect-stack.cpp
+++ b/src/live_effects/lpe-test-doEffect-stack.cpp
@@ -8,9 +8,6 @@
#include "live_effects/lpe-test-doEffect-stack.h"
-#include <2geom/piecewise.h>
-#include <vector>
-#include <cstring>
using std::memcpy;
namespace Inkscape {
diff --git a/src/live_effects/lpe-transform_2pts.cpp b/src/live_effects/lpe-transform_2pts.cpp
index d32cf42fc..78db622f2 100644
--- a/src/live_effects/lpe-transform_2pts.cpp
+++ b/src/live_effects/lpe-transform_2pts.cpp
@@ -14,9 +14,6 @@
#include "live_effects/lpe-transform_2pts.h"
#include "display/curve.h"
-#include <2geom/transforms.h>
-#include <2geom/pathvector.h>
-#include "sp-path.h"
#include "ui/icon-names.h"
#include "svg/svg.h"
#include "verbs.h"
diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp
index 7eda7446e..2486f3366 100644
--- a/src/live_effects/lpe-vonkoch.cpp
+++ b/src/live_effects/lpe-vonkoch.cpp
@@ -8,8 +8,6 @@
#include <glibmm/i18n.h>
-#include <2geom/transforms.h>
-
//using std::vector;
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpegroupbbox.cpp b/src/live_effects/lpegroupbbox.cpp
index 2a1b70a6a..3862ebcc8 100644
--- a/src/live_effects/lpegroupbbox.cpp
+++ b/src/live_effects/lpegroupbbox.cpp
@@ -7,8 +7,6 @@
#include "live_effects/lpegroupbbox.h"
-#include "sp-item.h"
-
namespace Inkscape {
namespace LivePathEffect {
diff --git a/src/live_effects/lpeobject-reference.cpp b/src/live_effects/lpeobject-reference.cpp
index d9de6e77f..1940806bd 100644
--- a/src/live_effects/lpeobject-reference.cpp
+++ b/src/live_effects/lpeobject-reference.cpp
@@ -8,7 +8,6 @@
#include <string.h>
-#include "enums.h"
#include "live_effects/lpeobject-reference.h"
#include "live_effects/lpeobject.h"
#include "uri.h"
diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp
index 8e5ae568f..b5b27c984 100644
--- a/src/live_effects/lpeobject.cpp
+++ b/src/live_effects/lpeobject.cpp
@@ -11,13 +11,10 @@
#include "xml/repr.h"
#include "xml/node-event-vector.h"
-#include "sp-object.h"
#include "attributes.h"
#include "document.h"
#include "document-private.h"
-#include <glibmm/i18n.h>
-
//#define LIVEPATHEFFECT_VERBOSE
static void livepatheffect_on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data);
diff --git a/src/live_effects/parameter/Makefile_insert b/src/live_effects/parameter/Makefile_insert
deleted file mode 100644
index d9cd5b3c1..000000000
--- a/src/live_effects/parameter/Makefile_insert
+++ /dev/null
@@ -1,38 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- live_effects/parameter/parameter.cpp \
- live_effects/parameter/parameter.h \
- live_effects/parameter/array.cpp \
- live_effects/parameter/array.h \
- live_effects/parameter/bool.cpp \
- live_effects/parameter/bool.h \
- live_effects/parameter/random.cpp \
- live_effects/parameter/random.h \
- live_effects/parameter/point.cpp \
- live_effects/parameter/point.h \
- live_effects/parameter/fontbutton.cpp \
- live_effects/parameter/fontbutton.h \
- live_effects/parameter/enum.h \
- live_effects/parameter/path-reference.cpp \
- live_effects/parameter/path-reference.h \
- live_effects/parameter/path.cpp \
- live_effects/parameter/path.h \
- live_effects/parameter/originalpath.cpp \
- live_effects/parameter/originalpath.h \
- live_effects/parameter/originalpatharray.cpp \
- live_effects/parameter/originalpatharray.h \
- live_effects/parameter/powerstrokepointarray.cpp \
- live_effects/parameter/powerstrokepointarray.h \
- live_effects/parameter/filletchamferpointarray.cpp \
- live_effects/parameter/filletchamferpointarray.h \
- live_effects/parameter/text.cpp \
- live_effects/parameter/text.h \
- live_effects/parameter/transformedpoint.cpp \
- live_effects/parameter/transformedpoint.h \
- live_effects/parameter/togglebutton.cpp \
- live_effects/parameter/togglebutton.h \
- live_effects/parameter/unit.cpp \
- live_effects/parameter/unit.h \
- live_effects/parameter/vector.cpp \
- live_effects/parameter/vector.h
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index dd1717b40..b3f6442bb 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -75,12 +75,8 @@ ToggleButtonParam::param_newWidget()
false,
param_effect->getRepr(),
param_effect->getSPDoc()) );
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget * box_button = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ auto box_button = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(box_button), false);
-#else
- GtkWidget * box_button = gtk_hbox_new (false, 0);
-#endif
GtkWidget * label_button = gtk_label_new ("");
if (!param_label.empty()) {
if(value || inactive_label.empty()){
@@ -167,7 +163,7 @@ ToggleButtonParam::toggled() {
param_effect->upd_params = true;
if (SP_ACTIVE_DESKTOP) {
Inkscape::Selection *selection = SP_ACTIVE_DESKTOP->getSelection();
- selection ->emitModified();
+ selection->emitModified();
}
_signal_toggled.emit();
}
diff --git a/src/live_effects/spiro.cpp b/src/live_effects/spiro.cpp
index 0ac2815bf..a2ff4813e 100644
--- a/src/live_effects/spiro.cpp
+++ b/src/live_effects/spiro.cpp
@@ -29,7 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#include <string.h>
#include "display/curve.h"
-#include <2geom/math-utils.h>
#define SPIRO_SHOW_INFINITE_COORDINATE_CALLS