lpe-mirror_symmetry.cpp revision 90a3966dd44e306d23febc15ebd65cde07d7a4dd
#define INKSCAPE_LPE_MIRROR_SYMMETRY_CPP
/** \file
* LPE <mirror_symmetry> implementation: mirrors a path with respect to a given line.
*/
/*
* Authors:
* Maximilian Albert
* Johan Engelen
*
* 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),
reflection_line(_("Reflection line"), _("Line which serves as 'mirror' for the reflection"), "reflection_line", &wr, this, "M0,0 L100,100")
{
show_orig_path = true;
}
{
}
void
{
using namespace Geom;
Geom::Rect bbox = *item->getBounds(t); // fixme: what happens if getBounds does not return a valid rect?
A *= t;
B *= t;
Piecewise<D2<SBasis> > rline = Piecewise<D2<SBasis> >(D2<SBasis>(Linear(A[X], B[X]), Linear(A[Y], B[Y])));
}
{
if (!discard_orig_path) {
}
double c = (B[0] - A[0]) / hyp; // cos(alpha)
m = m * sca;
m = m * m1;
}
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 :