/** \file
* LPE <mirror_symmetry> implementation: mirrors a path with respect to a given line.
*/
/*
* Authors:
* Maximilian Albert
* Johan Engelen
* Abhishek Sharma
* Jabiertxof
*
* 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 <gtkmm.h>
#include "live_effects/lpe-mirror_symmetry.h"
#include <sp-path.h>
#include <svg/path-string.h>
#include "knot-holder-entity.h"
#include "knotholder.h"
#include "inkscape.h"
namespace Inkscape {
namespace LivePathEffect {
{ MT_V, N_("Vertical Page Center"), "Vertical Page Center, use select tool to move item instead line" },
{ MT_H, N_("Horizontal Page Center"), "Horizontal Page Center, use select tool to move item instead line" },
};
namespace MS {
public:
};
public:
};
public:
};
} // namespace MS
discard_orig_path(_("Discard original path?"), _("Check this to only keep the mirrored part of the path"), "discard_orig_path", &wr, this, false),
fuse_paths(_("Fuse paths"), _("Fuse original and the reflection into a single path"), "fuse_paths", &wr, this, false),
oposite_fuse(_("Oposite fuse"), _("Picks the other side of the mirror as the original"), "oposite_fuse", &wr, this, false),
start_point(_("Start mirror line"), _("Start mirror line"), "start_point", &wr, this, "Adjust the start of mirroring"),
end_point(_("End mirror line"), _("End mirror line"), "end_point", &wr, this, "Adjust end of mirroring")
{
show_orig_path = true;
apply_to_clippath_and_mask = true;
}
{
}
void
{
using namespace Geom;
}
}
} else {
}
if(SP_ACTIVE_DESKTOP){
sp *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
ep *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
}
} else { //horizontal page
if(SP_ACTIVE_DESKTOP){
sp *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
ep *= i2anc_affine(SP_OBJECT(lpeitem), SP_OBJECT(SP_ACTIVE_DESKTOP->currentLayer()->parent)) .inverse();
}
}
}
void
{
using namespace Geom;
}
{
if (!discard_orig_path && !fuse_paths) {
}
m = m * sca;
m = m * m1;
if (fuse_paths && !discard_orig_path) {
{
continue;
}
int position = 0;
bool end_open = false;
end_open = true;
}
}
}
double diagonal = Geom::distance(Geom::Point(boundingbox_X.min(),boundingbox_Y.min()),Geom::Point(boundingbox_X.max(),boundingbox_Y.max()));
Geom::Rect bbox(Geom::Point(boundingbox_X.min(),boundingbox_Y.min()),Geom::Point(boundingbox_X.max(),boundingbox_Y.max()));
}
if (!oposite_fuse) {
position *= -1;
}
if (position == 1) {
if(i!=0) {
}
}
}
}
}
if (!oposite_fuse) {
position *= -1;
}
} else {
} else {
}
}
}
}
}
}
}
}
if (!fuse_paths || discard_orig_path) {
}
}
return path_out;
}
void
LPEMirrorSymmetry::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec)
{
using namespace Geom;
}
void
{
{
knotholder->add(c);
}
};
namespace MS {
using namespace Geom;
void
KnotHolderEntityCenterMirrorSymmetry::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
{
lpe->center_point = s;
// FIXME: this should not directly ask for updating the item. It should write to SVG, which triggers updating.
}
{
return lpe->center_point;
}
} // namespace CR
} //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 :