From: cilix42 Date: Fri, 4 Jul 2008 11:23:25 +0000 (+0000) Subject: Keep original path by default for LPEMirrorReflect X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=19337e57f455c0d7e4da72b6b3f438e68d507256;p=inkscape.git Keep original path by default for LPEMirrorReflect --- diff --git a/src/live_effects/lpe-mirror_reflect.cpp b/src/live_effects/lpe-mirror_reflect.cpp index 6a149dfc5..a501fbb8f 100644 --- a/src/live_effects/lpe-mirror_reflect.cpp +++ b/src/live_effects/lpe-mirror_reflect.cpp @@ -27,10 +27,12 @@ namespace LivePathEffect { LPEMirrorReflect::LPEMirrorReflect(LivePathEffectObject *lpeobject) : Effect(lpeobject), + discard_orig_path(_("Discard original path?"), _("Check this to only keep the mirrored part of the path"), "discard_orig_path", &wr, this, false), reflection_line(_("Reflection line"), _("Line which serves as 'mirror' for the reflection"), "reflection_line", &wr, this, "M0,0 L100,100") { show_orig_path = true; + registerParameter( dynamic_cast(&discard_orig_path) ); registerParameter( dynamic_cast(&reflection_line) ); } @@ -60,6 +62,9 @@ std::vector LPEMirrorReflect::doEffect_path (std::vector const & path_in) { std::vector path_out; + if (!discard_orig_path) { + path_out = path_in; + } std::vector mline(reflection_line.get_pathvector()); Geom::Point A(mline.front().initialPoint()); diff --git a/src/live_effects/lpe-mirror_reflect.h b/src/live_effects/lpe-mirror_reflect.h index 61745a439..4fd695e0e 100644 --- a/src/live_effects/lpe-mirror_reflect.h +++ b/src/live_effects/lpe-mirror_reflect.h @@ -34,6 +34,7 @@ public: virtual std::vector doEffect_path (std::vector const & path_in); private: + BoolParam discard_orig_path; PathParam reflection_line; LPEMirrorReflect(const LPEMirrorReflect&);