From a7f2b2ba3f13ceb60376802f4a31e104153839e8 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 17 Feb 2015 03:00:37 +0100 Subject: At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems" So, i tried that. And I will continue tomorrow, and the days after, on and on. (bzr r13922.1.1) --- src/live_effects/lpe-knot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index 3876aa24b..95a6b16dd 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -505,9 +505,9 @@ LPEKnot::doEffect_path (std::vector const &path_in) static void collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector &paths, std::vector &stroke_widths){ if (SP_IS_GROUP(lpeitem)) { - GSList const *item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); - for ( GSList const *iter = item_list; iter; iter = iter->next ) { - SPObject *subitem = static_cast(iter->data); + SelContainer item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); + for ( SelContainer::const_iterator iter=item_list.begin();iter!=item_list.end();iter++) { + SPObject *subitem = static_cast(*iter); if (SP_IS_LPE_ITEM(subitem)) { collectPathsAndWidths(SP_LPE_ITEM(subitem), paths, stroke_widths); } -- cgit v1.2.3 From 5fd00cab14d48beaf2279a2b8f3ad5b02b76c87b Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 19 Feb 2015 04:25:21 +0100 Subject: Put a few std::vector (bzr r13922.1.5) --- src/live_effects/lpe-knot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index 95a6b16dd..6cdf09180 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -505,8 +505,8 @@ LPEKnot::doEffect_path (std::vector const &path_in) static void collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector &paths, std::vector &stroke_widths){ if (SP_IS_GROUP(lpeitem)) { - SelContainer item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); - for ( SelContainer::const_iterator iter=item_list.begin();iter!=item_list.end();iter++) { + std::vector item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); + for ( std::vector::const_iterator iter=item_list.begin();iter!=item_list.end();iter++) { SPObject *subitem = static_cast(*iter); if (SP_IS_LPE_ITEM(subitem)) { collectPathsAndWidths(SP_LPE_ITEM(subitem), paths, stroke_widths); -- cgit v1.2.3 From 9a7fa4d1899d30ec745107823f307b2a0bf3172f Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 03:10:36 +0100 Subject: corrected the casts (hopefully) (bzr r13922.1.10) --- src/live_effects/lpe-knot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index 6cdf09180..7a1d391a3 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -506,7 +506,7 @@ static void collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector &paths, std::vector &stroke_widths){ if (SP_IS_GROUP(lpeitem)) { std::vector item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); - for ( std::vector::const_iterator iter=item_list.begin();iter!=item_list.end();iter++) { + for ( std::vector::const_iterator iter = item_list.begin(); iter != item_list.end(); iter++) { SPObject *subitem = static_cast(*iter); if (SP_IS_LPE_ITEM(subitem)) { collectPathsAndWidths(SP_LPE_ITEM(subitem), paths, stroke_widths); -- cgit v1.2.3 From 9bdc157f705ca61516e599cb416580283d21ec35 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 04:21:48 +0100 Subject: more cast cleanup (bzr r13922.1.11) --- src/live_effects/lpe-knot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index 7a1d391a3..6ec4b969b 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -507,7 +507,7 @@ collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector &paths, if (SP_IS_GROUP(lpeitem)) { std::vector item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); for ( std::vector::const_iterator iter = item_list.begin(); iter != item_list.end(); iter++) { - SPObject *subitem = static_cast(*iter); + SPObject *subitem = *iter; if (SP_IS_LPE_ITEM(subitem)) { collectPathsAndWidths(SP_LPE_ITEM(subitem), paths, stroke_widths); } -- cgit v1.2.3 From ba4dbfb351180e0fc4ad57be6e3534fa2ab5cf8c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 28 Apr 2015 00:38:31 +0100 Subject: Fix unnecessary inclusion of glibmm/threads.h. This can be resolved by ensuring that glibmm headers always preceed glib.h headers. Same applies with gtkmm/gtk+ etc (bzr r14064) --- src/live_effects/lpe-fillet-chamfer.h | 8 -------- src/live_effects/lpe-lattice2.cpp | 2 ++ src/live_effects/lpe-lattice2.h | 6 +++++- src/live_effects/parameter/originalpath.cpp | 4 ---- src/live_effects/parameter/originalpatharray.cpp | 4 ---- 5 files changed, 7 insertions(+), 17 deletions(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-fillet-chamfer.h b/src/live_effects/lpe-fillet-chamfer.h index 0d6a1ff17..fb06e804c 100644 --- a/src/live_effects/lpe-fillet-chamfer.h +++ b/src/live_effects/lpe-fillet-chamfer.h @@ -15,14 +15,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#if defined(GLIBMM_DISABLE_DEPRECATED) && defined(HAVE_GLIBMM_THREADS_H) -# include -#endif - #include "live_effects/parameter/enum.h" #include "live_effects/parameter/bool.h" #include "live_effects/parameter/unit.h" diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp index abd6e7786..02bda3af5 100644 --- a/src/live_effects/lpe-lattice2.cpp +++ b/src/live_effects/lpe-lattice2.cpp @@ -18,6 +18,8 @@ #include "live_effects/lpe-lattice2.h" +#include + #include "sp-shape.h" #include "sp-item.h" #include "sp-path.h" diff --git a/src/live_effects/lpe-lattice2.h b/src/live_effects/lpe-lattice2.h index ff2e75641..b32903c9e 100644 --- a/src/live_effects/lpe-lattice2.h +++ b/src/live_effects/lpe-lattice2.h @@ -18,12 +18,16 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ -#include #include "live_effects/parameter/enum.h" +#include #include "live_effects/effect.h" #include "live_effects/parameter/point.h" #include "live_effects/lpegroupbbox.h" +namespace Gtk { +class Expander; +} + namespace Inkscape { namespace LivePathEffect { diff --git a/src/live_effects/parameter/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp index 0884c4c9c..2741461be 100644 --- a/src/live_effects/parameter/originalpath.cpp +++ b/src/live_effects/parameter/originalpath.cpp @@ -8,10 +8,6 @@ # include "config.h" #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include "live_effects/parameter/originalpath.h" diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp index 7706dbdf8..78e061e66 100644 --- a/src/live_effects/parameter/originalpatharray.cpp +++ b/src/live_effects/parameter/originalpatharray.cpp @@ -8,10 +8,6 @@ # include "config.h" #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include "live_effects/parameter/originalpatharray.h" #include -- cgit v1.2.3 From c9402117b96cbde93c13cc52f1596b723861e8ec Mon Sep 17 00:00:00 2001 From: jabiertxof Date: Wed, 29 Apr 2015 11:25:54 -0400 Subject: Fix a bug linking a path parameter to a transformed element (bzr r14071) --- src/live_effects/parameter/path.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/live_effects') diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index ba95affd9..32e82ff8c 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -427,7 +427,13 @@ PathParam::paste_param_path(const char *svgd) if (svgd && *svgd) { // remove possible link to path remove_link(); - + SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); + if (item != NULL) { + Geom::PathVector path_clipboard = sp_svg_read_pathv(svgd); + path_clipboard *= item->i2doc_affine().inverse(); + svgd = sp_svg_write_path( path_clipboard ); + } + param_write_to_repr(svgd); signal_path_pasted.emit(); } -- cgit v1.2.3 From a0ed5b5138836e368e409b9ced656f970b225b38 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 3 May 2015 18:58:35 +0200 Subject: First batch (bzr r14095) --- src/live_effects/lpe-taperstroke.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 2c74af6d6..1888bc3f0 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -275,7 +275,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) pat_str << "M 1,0 C " << 1 - (double)smoothing << ",0 0,0.5 0,0.5 0,0.5 " << 1 - (double)smoothing << ",1 1,1"; pat_vec = sp_svg_read_pathv(pat_str.str().c_str()); - pwd2.concat(stretch_along(pathv_out[0].toPwSb(), pat_vec[0], -fabs(line_width))); + pwd2.concat(stretch_along(pathv_out[0].toPwSb(), pat_vec[0], fabs(line_width))); throwaway_path = Geom::path_from_piecewise(pwd2, LPE_CONVERSION_TOLERANCE)[0]; real_path.append(throwaway_path); @@ -304,7 +304,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) pat_vec = sp_svg_read_pathv(pat_str_1.str().c_str()); pwd2 = Piecewise >(); - pwd2.concat(stretch_along(pathv_out[2].toPwSb(), pat_vec[0], -fabs(line_width))); + pwd2.concat(stretch_along(pathv_out[2].toPwSb(), pat_vec[0], fabs(line_width))); throwaway_path = Geom::path_from_piecewise(pwd2, LPE_CONVERSION_TOLERANCE)[0]; if (!Geom::are_near(real_path.finalPoint(), throwaway_path.initialPoint()) && real_path.size() >= 1) { -- cgit v1.2.3 From c7ce360901e191572b207df27dd3e972bff3929f Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 3 May 2015 19:01:45 +0200 Subject: Revert bad commit (commited to wrong branch). (bzr r14096) --- src/live_effects/lpe-taperstroke.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 1888bc3f0..2c74af6d6 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -275,7 +275,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) pat_str << "M 1,0 C " << 1 - (double)smoothing << ",0 0,0.5 0,0.5 0,0.5 " << 1 - (double)smoothing << ",1 1,1"; pat_vec = sp_svg_read_pathv(pat_str.str().c_str()); - pwd2.concat(stretch_along(pathv_out[0].toPwSb(), pat_vec[0], fabs(line_width))); + pwd2.concat(stretch_along(pathv_out[0].toPwSb(), pat_vec[0], -fabs(line_width))); throwaway_path = Geom::path_from_piecewise(pwd2, LPE_CONVERSION_TOLERANCE)[0]; real_path.append(throwaway_path); @@ -304,7 +304,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) pat_vec = sp_svg_read_pathv(pat_str_1.str().c_str()); pwd2 = Piecewise >(); - pwd2.concat(stretch_along(pathv_out[2].toPwSb(), pat_vec[0], fabs(line_width))); + pwd2.concat(stretch_along(pathv_out[2].toPwSb(), pat_vec[0], -fabs(line_width))); throwaway_path = Geom::path_from_piecewise(pwd2, LPE_CONVERSION_TOLERANCE)[0]; if (!Geom::are_near(real_path.finalPoint(), throwaway_path.initialPoint()) && real_path.size() >= 1) { -- cgit v1.2.3 From 48e0423afcb02fe4a0f705d828a0dbdb3106b397 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 8 May 2015 15:46:25 +0200 Subject: fixes a few of jenkins warnings (bzr r14126) --- src/live_effects/lpe-gears.cpp | 2 +- src/live_effects/lpe-taperstroke.cpp | 4 ---- src/live_effects/parameter/filletchamferpointarray.cpp | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src/live_effects') diff --git a/src/live_effects/lpe-gears.cpp b/src/live_effects/lpe-gears.cpp index 003e22567..fafe143b5 100644 --- a/src/live_effects/lpe-gears.cpp +++ b/src/live_effects/lpe-gears.cpp @@ -168,7 +168,7 @@ Geom::Path Gear::path() { D2 root = _arc(cursor, cursor+root_advance, root_radius()); makeContinuous(root, prev); pb.append(SBasisCurve(root)); - cursor += root_advance; + //cursor += root_advance; prev = root.at1(); if (base_radius() > root_radius()) { diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 2c74af6d6..451810d04 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -389,13 +389,9 @@ Piecewise > stretch_along(Piecewise > pwd2_in, Geom::Path x0 -= pattBndsX->min(); y0 -= pattBndsY->middle(); - double xspace = 0; double noffset = 0; double toffset = 0; // Prevent more than 90% overlap... - if (xspace < -pattBndsX->extent()*.9) { - xspace = -pattBndsX->extent()*.9; - } y0+=noffset; diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp index e9d375b93..f05f401e4 100644 --- a/src/live_effects/parameter/filletchamferpointarray.cpp +++ b/src/live_effects/parameter/filletchamferpointarray.cpp @@ -506,7 +506,6 @@ std::vector FilletChamferPointArrayParam::get_times(int index, std::vect time_it1 = 0; } double resultLenght = 0; - time_it1_B = 1; if (subpaths[positions.first].closed() && last) { time_it2 = modf(to_time(index - positions.second , _vector[index - positions.second ][X]), &intpart); resultLenght = it1_length + to_len(index - positions.second, _vector[index - positions.second ][X]); -- cgit v1.2.3