lpe-mirror_symmetry.cpp revision 277de98842cc83afe0a8c6c9c79c9f36800ff451
/** \file
* LPE <mirror_symmetry> implementation: mirrors a path with respect to a given line.
*/
/*
* Authors:
* Maximilian Albert
* Johan Engelen
* Abhishek Sharma
*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
* Copyright (C) Maximilin Albert 2008 <maximilian.albert@gmail.com>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-mirror_symmetry.h"
#include <sp-path.h>
#include <svg/path-string.h>
namespace Inkscape {
namespace LivePathEffect {
discard_orig_path(_("Discard original path?"), _("Check this to only keep the mirrored part of the path"), "discard_orig_path", &wr, this, false),
fusionPaths(_("Fusioned symetry"), _("Fusion right side whith symm"), "fusionPaths", &wr, this, true),
reflection_line(_("Reflection line:"), _("Line which serves as 'mirror' for the reflection"), "reflection_line", &wr, this, "M0,0 L1,0")
{
show_orig_path = true;
}
{
}
void
{
}
void
{
using namespace Geom;
Piecewise<D2<SBasis> > rline = Piecewise<D2<SBasis> >(D2<SBasis>(Linear(A[X], B[X]), Linear(A[Y], B[Y])));
}
int
{
double pos = (B[Geom::X]-A[Geom::X])*(X[Geom::Y]-A[Geom::Y]) - (B[Geom::Y]-A[Geom::Y])*(X[Geom::X]-A[Geom::X]);
}
{
// Don't allow empty path parameter:
return path_in;
}
if (!discard_orig_path && !fusionPaths) {
}
double c = (B[0] - A[0]) / hyp; // cos(alpha)
m = m * sca;
m = m * m1;
if(fusionPaths && !discard_orig_path){
continue;
}
double timeStart = 0.0;
int position = 0;
bool end_open = false;
end_open = true;
}
}
}
if(reverseFusion){
position *= -1;
}
if(position == -1){
if(i!=0){
}
}
}
if(reverseFusion){
position *= -1;
}
} else {
} else {
}
}
}
}
}
}
if (!fusionPaths || discard_orig_path) {
}
}
return path_out;
}
} //namespace LivePathEffect
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :