summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 02c55b3)
raw | patch | inline | side by side (parent: 02c55b3)
author | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 4 Jul 2008 11:23:25 +0000 (11:23 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 4 Jul 2008 11:23:25 +0000 (11:23 +0000) |
src/live_effects/lpe-mirror_reflect.cpp | patch | blob | history | |
src/live_effects/lpe-mirror_reflect.h | patch | blob | history |
index 6a149dfc540d07cf216b2e40f96bc651d19ad6d6..a501fbb8fa1c4e631e6ce0448130a2bdae1e7cea 100644 (file)
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<Parameter *>(&discard_orig_path) );
registerParameter( dynamic_cast<Parameter *>(&reflection_line) );
}
LPEMirrorReflect::doEffect_path (std::vector<Geom::Path> const & path_in)
{
std::vector<Geom::Path> path_out;
+ if (!discard_orig_path) {
+ path_out = path_in;
+ }
std::vector<Geom::Path> mline(reflection_line.get_pathvector());
Geom::Point A(mline.front().initialPoint());
index 61745a4395b3633d80556568f8c0b995ced7aa94..4fd695e0ee392cb00b3414884a6e33a14d0aad28 100644 (file)
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
private:
+ BoolParam discard_orig_path;
PathParam reflection_line;
LPEMirrorReflect(const LPEMirrorReflect&);