From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/live_effects/lpe-taperstroke.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/live_effects/lpe-taperstroke.cpp') 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 - template inline bool withinRange(T value, T low, T high) { return (value > low && value < high); -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/live_effects/lpe-taperstroke.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/live_effects/lpe-taperstroke.cpp') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index f6f6b33dc..f2ddd4929 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -13,20 +13,28 @@ #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 + template inline bool withinRange(T value, T low, T high) { return (value > low && value < high); -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/live_effects/lpe-taperstroke.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/live_effects/lpe-taperstroke.cpp') 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 - template inline bool withinRange(T value, T low, T high) { return (value > low && value < high); -- cgit v1.2.3 From e973e1fc03c1b10c52a21af5f354f63b0f6624bd Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sat, 10 Dec 2016 17:15:17 +0100 Subject: Fix headers on LPE's (bzr r15318) --- src/live_effects/lpe-taperstroke.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/live_effects/lpe-taperstroke.cpp') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index f6f6b33dc..4ffc41691 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -26,6 +26,8 @@ #include "svg/svg.h" #include "knotholder.h" +// TODO due to internal breakage in glibmm headers, this must be last: +#include template inline bool withinRange(T value, T low, T high) { -- cgit v1.2.3 From 952eb10b1e00f0e4abfbf8dd23fcb3935019f098 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 19 Dec 2016 21:54:42 +0100 Subject: Remove some ocurrences of desktop in knot functions (bzr r15337) --- src/live_effects/lpe-taperstroke.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/live_effects/lpe-taperstroke.cpp') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 4ffc41691..f4a81aa90 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -435,14 +435,14 @@ Piecewise > stretch_along(Piecewise > pwd2_in, Geom::Path } } -void LPETaperStroke::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +void LPETaperStroke::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new TpS::KnotHolderEntityAttachBegin(this); - e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE); + e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE); knotholder->add(e); KnotHolderEntity *f = new TpS::KnotHolderEntityAttachEnd(this); - f->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE); + f->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE); knotholder->add(f); } -- cgit v1.2.3 From 48a1d89571b6da9fe574bcc49f8692b693d6fbf8 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sun, 7 May 2017 02:37:49 +0200 Subject: Improvement to store default line width on join type and tapper stroke pointed by Ede_123 on IRC (bzr r15671) --- src/live_effects/lpe-taperstroke.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/live_effects/lpe-taperstroke.cpp') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index f4a81aa90..a40a40146 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -91,6 +91,7 @@ LPETaperStroke::LPETaperStroke(LivePathEffectObject *lpeobject) : void LPETaperStroke::doOnApply(SPLPEItem const* lpeitem) { if (SP_IS_SHAPE(lpeitem)) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); SPLPEItem* item = const_cast(lpeitem); double width = (lpeitem && lpeitem->style) ? lpeitem->style->stroke_width.computed : 1.; @@ -117,8 +118,14 @@ void LPETaperStroke::doOnApply(SPLPEItem const* lpeitem) sp_desktop_apply_css_recursive(item, css, true); sp_repr_css_attr_unref (css); - - line_width.param_set_value(width); + Glib::ustring pref_path = (Glib::ustring)"/live_effects/" + + (Glib::ustring)LPETypeConverter.get_key(effectType()).c_str() + + (Glib::ustring)"/" + + (Glib::ustring)"stroke_width"; + bool valid = prefs->getEntry(pref_path).isValid(); + if(!valid){ + line_width.param_set_value(width); + } line_width.write_to_SVG(); } else { printf("WARNING: It only makes sense to apply Taper stroke to paths (not groups).\n"); -- cgit v1.2.3 From d3deb9184f7044f930133f37654e52bc24272616 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sun, 7 May 2017 19:16:47 +0200 Subject: Fix a bug on tapper stroke detected with Ede_123 on IRC (bzr r15673) --- src/live_effects/lpe-taperstroke.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/live_effects/lpe-taperstroke.cpp') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index a40a40146..45394ae91 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -477,7 +477,6 @@ void KnotHolderEntityAttachBegin::knot_set(Geom::Point const &p, Geom::Point con // use that object. Geom::PathVector pathv = lpe->pathvector_before_effect; - Piecewise > pwd2; Geom::Path p_in = return_at_first_cusp(pathv[0]); pwd2.concat(p_in.toPwSb()); -- cgit v1.2.3