27#include <glibmm/i18n.h>
30namespace LivePathEffect {
60 angle(_(
"Angle:"), _(
"Additional angle between tangent and curve"),
"angle", &wr, this, 0.0),
61 t_attach(_(
"Location along curve:"), _(
"Location of the point of attachment along the curve (between 0.0 and number-of-segments)"),
"t_attach", &wr, this, 0.5),
62 length_left(_(
"Length left:"), _(
"Specifies the left end of the tangent"),
"length-left", &wr, this, 150),
63 length_right(_(
"Length right:"), _(
"Specifies the right end of the tangent"),
"length-right", &wr, this, 150)
102 _(
"Adjust the point of attachment of the tangent"));
108 _(
"Adjust the <b>left</b> end of the tangent"));
114 _(
"Adjust the <b>right</b> end of the tangent"));
124 using namespace Geom;
128 Geom::Point const s = snap_knot_position(p, state);
132 g_warning(
"LPEItem is not a path! %s:%d\n", __FILE__, __LINE__);
147 LPETangentToCurve *lpe =
dynamic_cast<LPETangentToCurve *
>(_effect);
149 Geom::Point const s = snap_knot_position(p, state);
152 lpe->length_left.param_set_value(-lambda);
160 LPETangentToCurve *lpe =
dynamic_cast<LPETangentToCurve *
>(_effect);
162 Geom::Point const s = snap_knot_position(p, state);
165 lpe->length_right.param_set_value(lambda);
171KnotHolderEntityAttachPt::knot_get()
const
173 LPETangentToCurve
const *lpe =
dynamic_cast<LPETangentToCurve const*
>(_effect);
178KnotHolderEntityLeftEnd::knot_get()
const
180 LPETangentToCurve
const *lpe =
dynamic_cast<LPETangentToCurve const*
>(_effect);
185KnotHolderEntityRightEnd::knot_get()
const
187 LPETangentToCurve
const *lpe =
dynamic_cast<LPETangentToCurve const*
>(_effect);
Adaptor that creates 2D functions from 1D ones.
Function defined as discrete pieces.
Two-dimensional point that doubles as a vector.
Rotation around the origin.
static Rotate from_degrees(Coord deg)
Construct a rotation from its angle in degrees.
Polynomial in symmetric power basis.
void registerParameter(Parameter *param)
Geom::PathVector pathvector_before_effect
bool _provides_knotholder_entities
friend class TtC::KnotHolderEntityRightEnd
LPETangentToCurve(LivePathEffectObject *lpeobject)
~LPETangentToCurve() override
friend class TtC::KnotHolderEntityAttachPt
friend class TtC::KnotHolderEntityLeftEnd
Geom::Piecewise< Geom::D2< Geom::SBasis > > doEffect_pwd2(Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in) override
void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) 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)
Base class for visual SVG elements.
LPE <tangent_to_curve> implementation, see lpe-tangent_to_curve.cpp.
Various utility functions.
Piecewise< D2< SBasis > > paths_to_pw(PathVector const &paths)
Coord nearest_time(Point const &p, Curve const &c)
Bezier derivative(Bezier const &a)
Point unit_vector(Point const &a)
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.