lpe-parallel.cpp revision 76addc201c409e81eaaa73fe27cc0f79c4db097c
/** \file
* LPE <parallel> implementation
*/
/*
* Authors:
* Maximilian Albert
*
* Copyright (C) Johan Engelen 2007-2012 <j.b.c.engelen@alumnus.utwente.nl>
* Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-parallel.h"
#include "sp-shape.h"
#include "knot-holder-entity.h"
#include "knotholder.h"
namespace Inkscape {
namespace LivePathEffect {
namespace Pl {
class KnotHolderEntityLeftEnd : public LPEKnotHolderEntity {
public:
};
class KnotHolderEntityRightEnd : public LPEKnotHolderEntity {
public:
};
} // namespace Pl
// initialise your parameters here:
length_left(_("Length left:"), _("Specifies the left end of the parallel"), "length-left", &wr, this, 150),
length_right(_("Length right:"), _("Specifies the right end of the parallel"), "length-right", &wr, this, 150)
{
show_orig_path = true;
_provides_knotholder_entities = true;
}
{
}
void
{
A = *(curve->first_point());
B = *(curve->last_point());
dir = unit_vector(B - A);
}
{
using namespace Geom;
A = pwd2_in.firstValue();
dir = unit_vector(B - A);
}
{
_("Adjust the \"left\" end of the parallel") );
knotholder->add(e);
}
{
_("Adjust the \"right\" end of the parallel") );
knotholder->add(e);
}
};
namespace Pl {
void
{
using namespace Geom;
}
void
KnotHolderEntityRightEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
{
using namespace Geom;
}
KnotHolderEntityLeftEnd::knot_get() const
{
return lpe->C;
}
KnotHolderEntityRightEnd::knot_get() const
{
return lpe->D;
}
} // namespace Pl
/* ######################## */
} //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 :