25#include <glibmm/i18n.h>
28namespace LivePathEffect {
37class KnotHolderEntityLeftEnd :
public KnotHolderEntityEnd {
39 KnotHolderEntityLeftEnd(
LPEPerpBisector *effect) : KnotHolderEntityEnd(effect) {};
44class KnotHolderEntityRightEnd :
public KnotHolderEntityEnd {
46 KnotHolderEntityRightEnd(
LPEPerpBisector *effect) : KnotHolderEntityEnd(effect) {};
52KnotHolderEntityLeftEnd::knot_get()
const {
58KnotHolderEntityRightEnd::knot_get()
const {
64KnotHolderEntityEnd::bisector_end_set(
Geom::Point const &p, guint state,
bool left) {
97 length_left(_(
"Length left:"), _(
"Specifies the left end of the bisector"),
"length-left", &wr, this, 200),
98 length_right(_(
"Length right:"), _(
"Specifies the right end of the bisector"),
"length-right", &wr, this, 200),
99 A(0,0), B(0,0), M(0,0), C(0,0),
D(0,0), perp_dir(0,0)
134 using namespace Geom;
138 A = pwd2_in.firstValue();
139 B = pwd2_in.lastValue();
157 _(
"Adjust the \"left\" end of the bisector"));
163 _(
"Adjust the \"right\" end of the bisector"));
Adaptor that creates 2D functions from 1D ones.
Function defined as discrete pieces.
Two-dimensional point that doubles as a vector.
Polynomial in symmetric power basis.
void registerParameter(Parameter *param)
bool _provides_knotholder_entities
LPEPerpBisector(LivePathEffectObject *lpeobject)
void doOnApply(SPLPEItem const *lpeitem) override
Is performed a single time when the effect is freshly applied to a path.
Geom::Piecewise< Geom::D2< Geom::SBasis > > doEffect_pwd2(Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in) override
friend class PB::KnotHolderEntityRightEnd
void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item)
friend class PB::KnotHolderEntityLeftEnd
~LPEPerpBisector() override
void param_set_value(double val)
KnotHolderEntity definition.
void create(SPDesktop *desktop, SPItem *item, KnotHolder *parent, Inkscape::CanvasItemCtrlType type=Inkscape::CANVAS_ITEM_CTRL_TYPE_DEFAULT, Glib::ustring const &name="unknown", char const *tip="", uint32_t color=0xffffff00)
void add(KnotHolderEntity *e)
To do: update description of desktop.
Base class for visual SVG elements.
LPE <perp_bisector> implementation, see lpe-perp_bisector.cpp.
Various utility functions.
Coord nearest_time(Point const &p, Curve const &c)
Point unit_vector(Point const &a)
void bisector_end_set(SPItem *item, Geom::Point const &p, guint state, bool left=true)
Helper class to stream background task notifications as a series of messages.
@ CANVAS_ITEM_CTRL_TYPE_LPE
void sp_lpe_item_update_patheffect(SPLPEItem *lpeitem, bool wholetree, bool write, bool with_satellites)
Calls any registered handlers for the update_patheffect action.