diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-03 14:56:48 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-03 14:56:48 +0000 |
| commit | 2d71db83e3fe52505116fecf024f79a9777d4ee1 (patch) | |
| tree | 07b5e7b87af9ea1ba6bedd8b39fd96b0a13944c7 /src/live_effects | |
| parent | Renamed some functions, fixed tests (diff) | |
| parent | Removed unused includes, decreased compilation time. Once again (diff) | |
| download | inkscape-2d71db83e3fe52505116fecf024f79a9777d4ee1.tar.gz inkscape-2d71db83e3fe52505116fecf024f79a9777d4ee1.zip | |
Merged trunk
(bzr r14954.1.29)
Diffstat (limited to 'src/live_effects')
59 files changed, 62 insertions, 337 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 1868ca43b..ef807d586 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" @@ -64,30 +63,14 @@ #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-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 { 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 efea76039..f28ab4b31 100644 --- a/src/live_effects/lpe-copy_rotate.cpp +++ b/src/live_effects/lpe-copy_rotate.cpp @@ -11,17 +11,14 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <glibmm/i18n.h> #include <gdk/gdk.h> #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> namespace Inkscape { namespace LivePathEffect { 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 4c953bcda..8f0f8e18a 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 8b3f4714a..22cdf3c3e 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..307fab6fd 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; 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 a033a6c4a..221d03ebf 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 0c403daec..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,25 +17,11 @@ */ #include "live_effects/lpe-lattice2.h" - -#include <gtkmm/expander.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: using namespace Geom; @@ -280,7 +266,7 @@ void LPELattice2::onExpanderChanged() { expanded = expander->get_expanded(); - if(expander->get_expanded()) { + if(expanded) { expander->set_label (Glib::ustring(_("Hide Points"))); } else { expander->set_label (Glib::ustring(_("Show Points"))); diff --git a/src/live_effects/lpe-lattice2.h b/src/live_effects/lpe-lattice2.h index 8d0c18a3a..4a025d182 100644 --- a/src/live_effects/lpe-lattice2.h +++ b/src/live_effects/lpe-lattice2.h @@ -18,9 +18,9 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ -#include "live_effects/parameter/enum.h" -#include <gtkmm/widget.h> +#include <gtkmm.h> #include "live_effects/effect.h" +#include "live_effects/parameter/enum.h" #include "live_effects/parameter/point.h" #include "live_effects/lpegroupbbox.h" 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 9f3070ff4..a7459faed 100644 --- a/src/live_effects/lpe-mirror_symmetry.cpp +++ b/src/live_effects/lpe-mirror_symmetry.cpp @@ -13,21 +13,13 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <gtkmm.h> -#include <glibmm/i18n.h> - #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: namespace Inkscape { namespace LivePathEffect { diff --git a/src/live_effects/lpe-mirror_symmetry.h b/src/live_effects/lpe-mirror_symmetry.h index 3a244cb7e..9e5b4d628 100644 --- a/src/live_effects/lpe-mirror_symmetry.h +++ b/src/live_effects/lpe-mirror_symmetry.h @@ -15,7 +15,7 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ - +#include <gtkmm.h> #include "live_effects/effect.h" #include "live_effects/parameter/parameter.h" #include "live_effects/parameter/point.h" 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..7d6ac10ac 100644 --- a/src/live_effects/lpe-patternalongpath.cpp +++ b/src/live_effects/lpe-patternalongpath.cpp @@ -6,22 +6,12 @@ #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; 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..8a6a95f2e 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; diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 049e10f0f..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 { 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 105fe2fc4..3a486ff10 100644 --- a/src/live_effects/lpe-roughen.cpp +++ b/src/live_effects/lpe-roughen.cpp @@ -13,16 +13,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <gtkmm.h> -#include "desktop.h" #include "live_effects/lpe-roughen.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 <glibmm/i18n.h> -#include <cmath> +// TODO due to internal breakage in glibmm headers, this must be last: namespace Inkscape { namespace LivePathEffect { @@ -229,7 +224,7 @@ void LPERoughen::doEffect(SPCurve *curve) nCurve->lineto(curve_it1->finalPoint()); } last_move = Geom::Point(0, 0); - double length = curve_it1->length(0.001); + double length = curve_it1->length(0.01); std::size_t splits = 0; if (method == DM_SEGMENTS) { splits = segments; @@ -354,9 +349,6 @@ SPCurve const * LPERoughen::addNodesAndJitter(Geom::Curve const * A, Geom::Point point_a3 = seg1[3] + point_a3; ray.setPoints(prev,A->initialPoint()); point_a1 = A->initialPoint() + Geom::Point::polar(ray.angle(), max_lenght); - if(prev == Geom::Point(0,0)){ - point_a1 = randomize(max_lenght); - } if(last){ Geom::Path b2(point_b3); b2.appendNew<Geom::LineSegment>(point_a3); diff --git a/src/live_effects/lpe-roughen.h b/src/live_effects/lpe-roughen.h index 44a723c89..dbdb91e62 100644 --- a/src/live_effects/lpe-roughen.h +++ b/src/live_effects/lpe-roughen.h @@ -12,8 +12,9 @@ #ifndef INKSCAPE_LPE_ROUGHEN_H #define INKSCAPE_LPE_ROUGHEN_H -#include "live_effects/parameter/enum.h" +#include <gtkmm.h> #include "live_effects/effect.h" +#include "live_effects/parameter/enum.h" #include "live_effects/parameter/parameter.h" #include "live_effects/parameter/path.h" #include "live_effects/parameter/bool.h" 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 0bc1c4f17..388ea176f 100644 --- a/src/live_effects/lpe-show_handles.cpp +++ b/src/live_effects/lpe-show_handles.cpp @@ -6,16 +6,15 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <gtkmm.h> -#include <glibmm/i18n.h> #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" #include "desktop-style.h" #include "style.h" #include "svg/svg.h" +// 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-show_handles.h b/src/live_effects/lpe-show_handles.h index 34390dd32..8bff3c1a8 100644 --- a/src/live_effects/lpe-show_handles.h +++ b/src/live_effects/lpe-show_handles.h @@ -8,7 +8,7 @@ * Copyright (C) Jabier Arraiza Cenoz 2014 <jabier.arraiza@marker.es> * Released under GNU GPL, read the file 'COPYING' for more information */ - +#include <gtkmm.h> #include "live_effects/effect.h" #include "live_effects/lpegroupbbox.h" #include "live_effects/parameter/bool.h" diff --git a/src/live_effects/lpe-simplify.cpp b/src/live_effects/lpe-simplify.cpp index f807bdc8d..ec21e10d2 100644 --- a/src/live_effects/lpe-simplify.cpp +++ b/src/live_effects/lpe-simplify.cpp @@ -2,25 +2,15 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <gtkmm.h> - #include "live_effects/lpe-simplify.h" #include "display/curve.h" -#include "live_effects/parameter/parameter.h" -#include <glibmm/i18n.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> namespace Inkscape { namespace LivePathEffect { diff --git a/src/live_effects/lpe-simplify.h b/src/live_effects/lpe-simplify.h index 294d77b35..8135561af 100644 --- a/src/live_effects/lpe-simplify.h +++ b/src/live_effects/lpe-simplify.h @@ -6,7 +6,7 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ - +#include <gtkmm.h> #include "live_effects/effect.h" #include "live_effects/parameter/togglebutton.h" #include "live_effects/lpegroupbbox.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 3c4ce0708..2b03a4bb2 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/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp index 47a8b5615..c761731b7 100644 --- a/src/live_effects/parameter/togglebutton.cpp +++ b/src/live_effects/parameter/togglebutton.cpp @@ -24,10 +24,10 @@ namespace LivePathEffect { ToggleButtonParam::ToggleButtonParam( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, Effect* effect, bool default_value, const Glib::ustring& inactive_label, - char const * icon_active, char const * icon_inactive, - Inkscape::IconSize icon_size) + char const * _icon_active, char const * _icon_inactive, + Inkscape::IconSize _icon_size) : Parameter(label, tip, key, wr, effect), value(default_value), defvalue(default_value), - inactiveLabel(inactive_label), iconActive(icon_active), iconInactive(icon_inactive), iconSize(icon_size) + inactive_label(inactive_label), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size) { checkwdg = NULL; } @@ -75,38 +75,40 @@ ToggleButtonParam::param_newWidget() param_effect->getRepr(), param_effect->getSPDoc()) ); #if GTK_CHECK_VERSION(3,0,0) - GtkWidget * boxButton = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_set_homogeneous(GTK_BOX(boxButton), false); + GtkWidget * box_button = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_set_homogeneous(GTK_BOX(box_button), false); #else - GtkWidget * boxButton = gtk_hbox_new (false, 0); + GtkWidget * box_button = gtk_hbox_new (false, 0); #endif - GtkWidget * labelButton = gtk_label_new (""); + GtkWidget * label_button = gtk_label_new (""); if (!param_label.empty()) { - if(value || inactiveLabel.empty()){ - gtk_label_set_text(GTK_LABEL(labelButton), param_label.c_str()); + if(value || inactive_label.empty()){ + gtk_label_set_text(GTK_LABEL(label_button), param_label.c_str()); }else{ - gtk_label_set_text(GTK_LABEL(labelButton), inactiveLabel.c_str()); + gtk_label_set_text(GTK_LABEL(label_button), inactive_label.c_str()); } } - gtk_widget_show(labelButton); - if ( iconActive ) { - if(!iconInactive){ - iconInactive = iconActive; + gtk_widget_show(label_button); + if ( _icon_active ) { + if(!_icon_inactive){ + _icon_inactive = _icon_active; } - gtk_widget_show(boxButton); - GtkWidget *iconButton = sp_icon_new(iconSize, iconActive); + gtk_widget_show(box_button); + GtkWidget *icon_button = NULL; if(!value){ - iconButton = sp_icon_new(iconSize, iconInactive); + icon_button = sp_icon_new(_icon_size, _icon_inactive); + } else { + icon_button = sp_icon_new(_icon_size, _icon_active); } - gtk_widget_show(iconButton); - gtk_box_pack_start (GTK_BOX(boxButton), iconButton, false, false, 1); + gtk_widget_show(icon_button); + gtk_box_pack_start (GTK_BOX(box_button), icon_button, false, false, 1); if (!param_label.empty()) { - gtk_box_pack_start (GTK_BOX(boxButton), labelButton, false, false, 1); + gtk_box_pack_start (GTK_BOX(box_button), label_button, false, false, 1); } }else{ - gtk_box_pack_start (GTK_BOX(boxButton), labelButton, false, false, 1); + gtk_box_pack_start (GTK_BOX(box_button), label_button, false, false, 1); } - checkwdg->add(*Gtk::manage(Glib::wrap(boxButton))); + checkwdg->add(*Gtk::manage(Glib::wrap(box_button))); checkwdg->setActive(value); checkwdg->setProgrammatically = false; checkwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change togglebutton parameter")); @@ -126,25 +128,27 @@ ToggleButtonParam::refresh_button() if(!checkwdg){ return; } - Gtk::Widget * boxButton = checkwdg->get_child(); - if(!boxButton){ + Gtk::Widget * box_button = checkwdg->get_child(); + if(!box_button){ return; } - GList * childs = gtk_container_get_children(GTK_CONTAINER(boxButton->gobj())); - guint totalWidgets = g_list_length (childs); + GList * childs = gtk_container_get_children(GTK_CONTAINER(box_button->gobj())); + guint total_widgets = g_list_length (childs); if (!param_label.empty()) { - if(value || inactiveLabel.empty()){ - gtk_label_set_text(GTK_LABEL(g_list_nth_data(childs, totalWidgets-1)), param_label.c_str()); + if(value || inactive_label.empty()){ + gtk_label_set_text(GTK_LABEL(g_list_nth_data(childs, total_widgets-1)), param_label.c_str()); }else{ - gtk_label_set_text(GTK_LABEL(g_list_nth_data(childs, totalWidgets-1)), inactiveLabel.c_str()); + gtk_label_set_text(GTK_LABEL(g_list_nth_data(childs, total_widgets-1)), inactive_label.c_str()); } } - if ( iconActive ) { - GdkPixbuf * iconPixbuf = sp_pixbuf_new( iconSize, iconActive ); + if ( _icon_active ) { + GdkPixbuf * icon_pixbuf = NULL; if(!value){ - iconPixbuf = sp_pixbuf_new( iconSize, iconInactive); + icon_pixbuf = sp_pixbuf_new( _icon_size, _icon_inactive ); + } else { + icon_pixbuf = sp_pixbuf_new( _icon_size, _icon_active ); } - gtk_image_set_from_pixbuf (GTK_IMAGE(g_list_nth_data(childs, 0)), iconPixbuf); + gtk_image_set_from_pixbuf (GTK_IMAGE(g_list_nth_data(childs, 0)), icon_pixbuf); } } diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h index 4e545bcfd..8390fec86 100644 --- a/src/live_effects/parameter/togglebutton.h +++ b/src/live_effects/parameter/togglebutton.h @@ -59,10 +59,10 @@ private: void refresh_button(); bool value; bool defvalue; - const Glib::ustring inactiveLabel; - const char * iconActive; - const char * iconInactive; - Inkscape::IconSize iconSize; + const Glib::ustring inactive_label; + const char * _icon_active; + const char * _icon_inactive; + Inkscape::IconSize _icon_size; Inkscape::UI::Widget::RegisteredToggleButton * checkwdg; sigc::signal<void> _signal_toggled; 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 |
