From aa042e930bc5cce596829086ce84f2c3c7c885ad Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 17 Jun 2012 00:08:03 -0700 Subject: Removed outdated classes. Pruned header to not introduce extraneous includes. (bzr r11502) --- src/live_effects/lpe-parallel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/live_effects/lpe-parallel.cpp') diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp index 95340fcf4..52849c20d 100644 --- a/src/live_effects/lpe-parallel.cpp +++ b/src/live_effects/lpe-parallel.cpp @@ -12,6 +12,8 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include + #include "live_effects/lpe-parallel.h" #include "sp-shape.h" #include "display/curve.h" -- cgit v1.2.3 From 971ef4214070c37a0a09d7bc9e194fd94279e5c3 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 17 Jun 2012 00:24:54 -0700 Subject: Removed unneeded header style filename #defines (bzr r11503) --- src/live_effects/lpe-parallel.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/live_effects/lpe-parallel.cpp') diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp index 52849c20d..a6b894ce3 100644 --- a/src/live_effects/lpe-parallel.cpp +++ b/src/live_effects/lpe-parallel.cpp @@ -1,4 +1,3 @@ -#define INKSCAPE_LPE_PARALLEL_CPP /** \file * LPE implementation */ -- cgit v1.2.3 From c524e974852c8bb0a356353e23702be96fff9b83 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 14 Oct 2012 20:06:40 +0200 Subject: Fix "shift disables snapping" for LPEs and for editing objects Fixed bugs: - https://launchpad.net/bugs/1065931 (bzr r11800) --- src/live_effects/lpe-parallel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/live_effects/lpe-parallel.cpp') diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp index a6b894ce3..5638bf6de 100644 --- a/src/live_effects/lpe-parallel.cpp +++ b/src/live_effects/lpe-parallel.cpp @@ -113,13 +113,13 @@ void LPEParallel::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *deskt namespace Pl { void -KnotHolderEntityLeftEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint /*state*/) +KnotHolderEntityLeftEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state) { using namespace Geom; LPEParallel *lpe = dynamic_cast(_effect); - Geom::Point const s = snap_knot_position(p); + Geom::Point const s = snap_knot_position(p, state); double lambda = L2(s - lpe->offset_pt) * sgn(dot(s - lpe->offset_pt, lpe->dir)); lpe->length_left.param_set_value(-lambda); @@ -128,13 +128,13 @@ KnotHolderEntityLeftEnd::knot_set(Geom::Point const &p, Geom::Point const &/*ori } void -KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint /*state*/) +KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state) { using namespace Geom; LPEParallel *lpe = dynamic_cast(_effect); - Geom::Point const s = snap_knot_position(p); + Geom::Point const s = snap_knot_position(p, state); double lambda = L2(s - lpe->offset_pt) * sgn(dot(s - lpe->offset_pt, lpe->dir)); lpe->length_right.param_set_value(lambda); -- cgit v1.2.3 From 6e7e20a81f37f1e4b31d69fde6bf48b9f0a2fc92 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Sun, 21 Oct 2012 20:04:54 +0200 Subject: UI uniformisation (bzr r11817) --- src/live_effects/lpe-parallel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/live_effects/lpe-parallel.cpp') diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp index 5638bf6de..4d4b0c17d 100644 --- a/src/live_effects/lpe-parallel.cpp +++ b/src/live_effects/lpe-parallel.cpp @@ -48,8 +48,8 @@ LPEParallel::LPEParallel(LivePathEffectObject *lpeobject) : Effect(lpeobject), // initialise your parameters here: offset_pt(_("Offset"), _("Adjust the offset"), "offset_pt", &wr, this), - length_left(_("Length left"), _("Specifies the left end of the parallel"), "length-left", &wr, this, 150), - length_right(_("Length right"), _("Specifies the right end of the parallel"), "length-right", &wr, this, 150) + length_left(_("Length left:"), _("Specifies the left end of the parallel"), "length-left", &wr, this, 150), + length_right(_("Length right:"), _("Specifies the right end of the parallel"), "length-right", &wr, this, 150) { show_orig_path = true; _provides_knotholder_entities = true; -- cgit v1.2.3 From a70c7514a9dd5fc8d5eabe486141dfd259d2ed55 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 17 Jan 2013 20:00:40 +0100 Subject: more const happiness (and removal of duplicate code in sp-object.h) (bzr r12038) --- src/live_effects/lpe-parallel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live_effects/lpe-parallel.cpp') diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp index 4d4b0c17d..cbe3ba509 100644 --- a/src/live_effects/lpe-parallel.cpp +++ b/src/live_effects/lpe-parallel.cpp @@ -65,7 +65,7 @@ LPEParallel::~LPEParallel() } void -LPEParallel::doOnApply (SPLPEItem *lpeitem) +LPEParallel::doOnApply (SPLPEItem const* lpeitem) { SPCurve const *curve = SP_SHAPE(lpeitem)->_curve; -- cgit v1.2.3 From bf58d4cb9c86682d1416c64378d1cfc8a95554e8 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 17 Jan 2013 21:02:50 +0100 Subject: const .... (bzr r12039) --- src/live_effects/lpe-parallel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/live_effects/lpe-parallel.cpp') diff --git a/src/live_effects/lpe-parallel.cpp b/src/live_effects/lpe-parallel.cpp index cbe3ba509..bb37fd42c 100644 --- a/src/live_effects/lpe-parallel.cpp +++ b/src/live_effects/lpe-parallel.cpp @@ -32,14 +32,14 @@ class KnotHolderEntityLeftEnd : public LPEKnotHolderEntity { public: KnotHolderEntityLeftEnd(LPEParallel *effect) : LPEKnotHolderEntity(effect) {}; virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state); - virtual Geom::Point knot_get(); + virtual Geom::Point knot_get() const; }; class KnotHolderEntityRightEnd : public LPEKnotHolderEntity { public: KnotHolderEntityRightEnd(LPEParallel *effect) : LPEKnotHolderEntity(effect) {}; virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state); - virtual Geom::Point knot_get(); + virtual Geom::Point knot_get() const; }; } // namespace Pl @@ -143,16 +143,16 @@ KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*or } Geom::Point -KnotHolderEntityLeftEnd::knot_get() +KnotHolderEntityLeftEnd::knot_get() const { - LPEParallel *lpe = dynamic_cast(_effect); + LPEParallel const *lpe = dynamic_cast(_effect); return lpe->C; } Geom::Point -KnotHolderEntityRightEnd::knot_get() +KnotHolderEntityRightEnd::knot_get() const { - LPEParallel *lpe = dynamic_cast(_effect); + LPEParallel const *lpe = dynamic_cast(_effect); return lpe->D; } -- cgit v1.2.3