From e7afb49bd67284227bf5df1df22f9993b1bfa581 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Thu, 21 Jul 2016 21:05:55 +0200 Subject: =?UTF-8?q?This=20for=20you=20CR=20=C2=B7=20Measure=20line,=20show?= =?UTF-8?q?=20the=20distance=20on=20rect=20lines=20CAD=20like=20with=20aut?= =?UTF-8?q?o=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (bzr r15017.1.1) --- src/live_effects/effect.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 1868ca43b..d01312ca7 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -40,6 +40,7 @@ #include "live_effects/lpe-lattice2.h" #include "live_effects/lpe-lattice.h" #include "live_effects/lpe-line_segment.h" +#include "live_effects/lpe-measure-line.h" #include "live_effects/lpe-mirror_symmetry.h" #include "live_effects/lpe-offset.h" #include "live_effects/lpe-parallel.h" @@ -151,6 +152,8 @@ const Util::EnumData LPETypeData[] = { {FILL_BETWEEN_MANY, N_("Fill between many"), "fill_between_many"}, {ELLIPSE_5PTS, N_("Ellipse by 5 points"), "ellipse_5pts"}, {BOUNDING_BOX, N_("Bounding Box"), "bounding_box"}, +/* 9.93 */ + {MEASURE_LINE, N_("Measure Line"), "measure-line"}, }; const Util::EnumDataConverter LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData)); @@ -319,6 +322,9 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) case TRANSFORM_2PTS: neweffect = static_cast ( new LPETransform2Pts(lpeobj) ); break; + case MEASURE_LINE: + neweffect = static_cast ( new LPEMeasureLine(lpeobj) ); + break; default: g_warning("LivePathEffect::Effect::New called with invalid patheffect type (%d)", lpenr); neweffect = NULL; -- cgit v1.2.3 From a5d6c9a27683820be3d84eea73c2d6f161ce0e8e Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sun, 24 Jul 2016 18:49:11 +0200 Subject: Add Text tag and update widgets code (bzr r15017.1.2) --- src/live_effects/effect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index d01312ca7..a62e8b62b 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -370,6 +370,7 @@ Effect::Effect(LivePathEffectObject *lpeobject) concatenate_before_pwd2(false), sp_lpe_item(NULL), current_zoom(1), + upd_params(true), sp_curve(NULL), provides_own_flash_paths(true), // is automatically set to false if providesOwnFlashPaths() is not overridden is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden @@ -697,7 +698,7 @@ Effect::newWidget() ++it; } - + upd_params = false; return dynamic_cast(vbox); } -- cgit v1.2.3 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/effect.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/live_effects/effect.cpp') 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 #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 #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 #include "display/curve.h" -#include - -#include <2geom/sbasis-to-bezier.h> -#include <2geom/affine.h> -#include <2geom/pathvector.h> - namespace Inkscape { -- 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/effect.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index ef807d586..1868ca43b 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -8,11 +8,12 @@ //#define LPE_ENABLE_TEST_EFFECTS //uncomment for toy effects #ifdef HAVE_CONFIG_H -#include +# 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" @@ -63,14 +64,30 @@ #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 #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 #include "display/curve.h" +#include + +#include <2geom/sbasis-to-bezier.h> +#include <2geom/affine.h> +#include <2geom/pathvector.h> + namespace Inkscape { -- cgit v1.2.3 From 7f16afbb515eceed9c63afacec73cd528a662327 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 30 Jul 2016 19:04:34 +0200 Subject: Full rewrite on working mode now no linked paths necesary (bzr r15017.1.15) --- src/live_effects/effect.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index a62e8b62b..7efc1a711 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -454,7 +454,9 @@ void Effect::doAfterEffect (SPLPEItem const* /*lpeitem*/) void Effect::doOnRemove (SPLPEItem const* /*lpeitem*/) { } - +void Effect::doOnVisibilityToggled(SPLPEItem const* /*lpeitem*/) +{ +} //secret impl methods (shhhh!) void Effect::doOnApply_impl(SPLPEItem const* lpeitem) { -- 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/effect.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/live_effects/effect.cpp') 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 #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 #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 #include "display/curve.h" -#include - -#include <2geom/sbasis-to-bezier.h> -#include <2geom/affine.h> -#include <2geom/pathvector.h> - namespace Inkscape { -- cgit v1.2.3 From e1a84ff6c44588f7847258b5eb5266365e0738e1 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 29 Aug 2016 15:27:55 +0200 Subject: Fixes to helper paths. evaluate backport to 0.92.x (bzr r15086) --- src/live_effects/effect.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index ef807d586..033eb8955 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -66,6 +66,7 @@ #include "message-stack.h" #include "document-private.h" #include "ui/tools/pen-tool.h" +#include "ui/tools/node-tool.h" #include "ui/tools-switch.h" #include "knotholder.h" #include "live_effects/lpeobject.h" @@ -454,6 +455,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(); } /** @@ -643,6 +645,17 @@ Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector(desktop->event_context); + nt->update_helperpath(); + } + } +} /** * This *creates* a new widget, management of deletion should be done by the caller -- cgit v1.2.3 From 3a70c702b97414c4508c6871462d1fa4f1433ad7 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 29 Aug 2016 18:15:30 +0200 Subject: Add comment and fix in helper paths (bzr r15087) --- src/live_effects/effect.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 033eb8955..fd1b8e3ec 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -645,6 +645,9 @@ Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector Date: Mon, 29 Aug 2016 18:26:57 +0200 Subject: Fix some comment typos (bzr r15088) --- src/live_effects/effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index fd1b8e3ec..007a8ca38 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -646,7 +646,7 @@ Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector Date: Sat, 3 Dec 2016 20:05:32 +0100 Subject: Improvements and fixes for buds pointed by suv on measure line LPE (bzr r15294) --- src/live_effects/effect.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 792bb5d7a..41b7d8c2c 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -350,6 +350,7 @@ Effect::Effect(LivePathEffectObject *lpeobject) oncanvasedit_it(0), is_visible(_("Is visible?"), _("If unchecked, the effect remains applied to the object but is temporarily disabled on canvas"), "is_visible", &wr, this, true), show_orig_path(false), + erase_extra_objects(true), lpeobj(lpeobject), concatenate_before_pwd2(false), sp_lpe_item(NULL), -- cgit v1.2.3 From 5ba49eaa5621b2e232f8df179798a1b2b282890c Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 19 Dec 2016 19:00:54 +0100 Subject: Add update_helperpaths not member of nodetool class to easy call from outside (bzr r15335) --- src/live_effects/effect.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 41b7d8c2c..4458c3a20 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -660,14 +660,7 @@ Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector(desktop->event_context); - nt->update_helperpath(); - } - } + Inkscape::UI::Tools::sp_update_helperpath(); } /** -- 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/effect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 4458c3a20..5cc0d6f20 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -612,15 +612,15 @@ Effect::registerParameter(Parameter * param) * Add all registered LPE knotholder handles to the knotholder */ void -Effect::addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { +Effect::addHandles(KnotHolder *knotholder, SPItem *item) { using namespace Inkscape::LivePathEffect; // add handles provided by the effect itself - addKnotHolderEntities(knotholder, desktop, item); + addKnotHolderEntities(knotholder, item); // add handles provided by the effect's parameters (if any) for (std::vector::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { - (*p)->addKnotHolderEntities(knotholder, desktop, item); + (*p)->addKnotHolderEntities(knotholder, item); } } -- cgit v1.2.3