summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 551b23a1d..0497d0e37 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -21,6 +21,9 @@
#include <glibmm/i18n.h>
#include "pen-context.h"
#include "tools-switch.h"
+#include "message-stack.h"
+#include "desktop.h"
+#include "nodepath.h"
#include "live_effects/lpeobject.h"
#include "live_effects/parameter/parameter.h"
@@ -55,8 +58,6 @@
#include "live_effects/lpe-mirror_reflect.h"
// end of includes
-#include "nodepath.h"
-
namespace Inkscape {
namespace LivePathEffect {
@@ -186,6 +187,8 @@ 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),
done_pathparam_set(false),
+ provides_own_flash_paths(true), // is automatically set to false if providesOwnFlashPaths() is not overridden
+ show_orig_path(false),
lpeobj(lpeobject),
concatenate_before_pwd2(false)
{
@@ -400,6 +403,27 @@ Effect::addPointParamHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem
}
}
+void
+Effect::addHelperPaths(SPLPEItem *lpeitem, SPDesktop *desktop)
+{
+ g_return_if_fail(SP_IS_PATH(lpeitem));
+
+ if (show_orig_path) {
+ SPCanvasItem *canvasitem = sp_nodepath_generate_helperpath(desktop, SP_PATH(lpeitem));
+ // TODO: Make sure the tempitem doesn't get destroyed when the mouse leaves the item
+ Inkscape::Display::TemporaryItem* tmpitem = desktop->add_temporary_canvasitem (canvasitem, 0);
+ lpeitem->lpe_helperpaths.push_back(tmpitem);
+ }
+ addHelperPathsImpl(lpeitem, desktop);
+}
+
+void
+Effect::addHelperPathsImpl(SPLPEItem *lpeitem, SPDesktop *desktop)
+{
+ // if this method is overloaded in derived classes, provides_own_flash_paths will be true
+ provides_own_flash_paths = false;
+}
+
/**
* This *creates* a new widget, management of deletion should be done by the caller
*/